Create custom Dynamic Components in Tailwind CSS using matchComponents Plugin Function

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.พ. 2025
  • In Tailwind you can create your own components which are can vary slightly based on your custom key in the theme. Avatar is one such example for a dynamic component that you can create using the matchComponents plugin function in Tailwind configuration. You will see why and how to create one in this video.
    Demo:
    play.tailwindc...
    Want to master Tailwind CSS with such awesome examples and explanations? You'd love my eBook and video course "Level up with Tailwind CSS". Check it out here - shrutibalasa.g...
    Use the discount code "THIRUS10" to get a special 10% discount.
    Follow me on Twitter / X - / shrutibalasa

ความคิดเห็น • 22

  • @MrCC-hx8xr
    @MrCC-hx8xr 2 หลายเดือนก่อน +1

    More videos like this! This is advanced approach how to use Tailwind with very clear way,
    (and there aren't many of those anywhere)
    Thx a lot.

    • @Thirus
      @Thirus  2 หลายเดือนก่อน

      Thank you! Yes, there aren’t many out there. Also, all of this is changing with version 4. Lots of new content with that next.

  • @amirnadji5427
    @amirnadji5427 ปีที่แล้ว +1

    Nice! didn't know this wonderful option

    • @Thirus
      @Thirus  ปีที่แล้ว

      Glad to know now :)

  • @anj000
    @anj000 หลายเดือนก่อน

    It doesn't fully work for me. Instead of flat theme I would like to use nested color, for example like this:
    theme: {
    colors: {
    primary: {
    DEFAULT: '#....'
    5: '#....'
    10: '#....'
    50: '#....'
    }
    secondary: {
    5: '#....'
    10: '#....'
    }
    }
    }
    But this approach is not taking nesting into the account and only generates `custom-primary` and `custom-secondary` instead of all possible values.

  • @MrCC-hx8xr
    @MrCC-hx8xr 4 วันที่ผ่านมา

    As I wrote once before, it's a nice demonstration, but in practice it seems to me to be skeletal and cluttered. I want to write CSS in a CSS file, not a JS file. But then Tailwind whisperer doesn't whisper in VSC.
    How would this be written for the current version 4 of tailwind today? The approach has changed (all in the CSS file), but I would like VSC to whisper.
    Can you make a video? :-)

  • @thewandadoll7089
    @thewandadoll7089 6 หลายเดือนก่อน +1

    how can you make tailwind intellisense aito complete your custom class?

    • @Thirus
      @Thirus  6 หลายเดือนก่อน

      If you add it on the configuration like I did, it will autocomplete on its own

  • @SpeedCodes-oc7ed
    @SpeedCodes-oc7ed 11 หลายเดือนก่อน +2

    Hi dear Thirus, i really can't wait until you release your alpinejs course, do you have any publish date?

    • @Thirus
      @Thirus  11 หลายเดือนก่อน +1

      I still haven’t decided firmly on doing it. Might do a 30 mins crash course. But not anytime in the next 4 months :(

    • @Thirus
      @Thirus  11 หลายเดือนก่อน +1

      But I really like Traversy Media’s course on it - th-cam.com/video/r5iWCtfltso/w-d-xo.htmlsi=MvEMKVBdPqg21oxf
      I’m not sure if I can do a better job than this.

    • @SpeedCodes-oc7ed
      @SpeedCodes-oc7ed 11 หลายเดือนก่อน +1

      @@Thirus thanks for your stuff, yeah i can understand it, i've looking more something about go deeper into this issue... to create components stuffs, you know :)....

  • @arshadahamed988
    @arshadahamed988 5 หลายเดือนก่อน

    I have doubt what is tailwindcss/plugin

  • @thepromisebenard
    @thepromisebenard ปีที่แล้ว +1

    Nice video... Mind sharing your vscode settings? I love the look and feel of it..

    • @Thirus
      @Thirus  ปีที่แล้ว +1

      I really don’t remember what settings I’ve changed. I followed part of the course by Caleb Porzio - “Make VS code awesome”

    • @thepromisebenard
      @thepromisebenard ปีที่แล้ว +1

      @@Thirus thank you for the response

  • @adilaarshad4859
    @adilaarshad4859 ปีที่แล้ว +1

    My happiness❤❤❤❤❤❤

    • @Thirus
      @Thirus  ปีที่แล้ว

      Ha ha 😀

  • @one-stop-zone
    @one-stop-zone ปีที่แล้ว +1

    Hi maam, Try to upload more websites development videos using tailwind. Please create realtime webpages and use page animantions etc.

    • @Thirus
      @Thirus  ปีที่แล้ว +1

      There are many such videos on this channel already. Do check them out

    • @one-stop-zone
      @one-stop-zone ปีที่แล้ว +1

      @@Thirus I have watched every thing, there are cropped or short videos, could you please make complete website tutorials with advanced topics.

    • @one-stop-zone
      @one-stop-zone ปีที่แล้ว +1

      @@Thirus you have a great teaching skill, please do more videos