How to Create Themes with Tailwind CSS

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ต.ค. 2024

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

  • @clarke6808
    @clarke6808 20 วันที่ผ่านมา

    Awesome - just what i needed,,, cheers

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

    Just what I needed. This is amazing. Thank you.

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

      Glad it helped

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

    i hope you the best

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

      🙏

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

    Thank you sooooo much!

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

      You’re welcome. Thanks for watching

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

    This video helped me a lot, thank you.

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

      Glad it helped! Thanks for the feedback.

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

    Damn nice tutorial.

    • @SkiesDev
      @SkiesDev  2 ปีที่แล้ว

      Thank you, I’m glad you liked it.

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

    I found your video incredibly helpful, thank you. I have a question though, in your example is possible to change the theme on the same page, I'm struggling to implement this functionality on other page, (ie toggleTheme.tsx) to load on the whole app the moment it changes the color. Currently, the theme updates across the entire app only upon page refresh, rather than dynamically. Do you happen to have a project that addresses this, or could you enlighten me on how to do it?

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

      Good question. You may want to have your theme set up high up in your React tree, and use the Context API to share the theme's setting across pages. react.dev/learn/passing-data-deeply-with-context

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

      @@SkiesDev Fun fact I was doing some research last week and found out that in fact useContext is better suited for this case. Thanks bro

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

    and I love the tutorial, I hope work on my project

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

      Thanks! Glad you liked it. Good luck with your project. Let me know how it goes.

  • @GreedHo-h1c
    @GreedHo-h1c ปีที่แล้ว

    Thank you!

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

    well skies. I'm from Nigeria. what if i wanted to use a color palette to randomly selected. anything colors what then do i do ? in your case you only did an array of three colors const colors = ['green', 'yellow', 'red`']
    const modes = ['light', 'dark']

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

      I would probably handle this by defining all the colors you want to support, and use JavaScript to handle randomly selecting from the list of colors you support.

  • @268snake
    @268snake ปีที่แล้ว

    why do styles like bg-primary-400 not work? is it something i set up wrong or should i do something else?

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

      Can you share a small example Gist?

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

    i never kned className can use filter method. thanks!

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

      👍🏻 it’s a handy way to clean up long strings of classes

  • @md.mohiulislam6516
    @md.mohiulislam6516 ปีที่แล้ว

    why not in config file only for define theme? why you use css variable?

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

      Because using the CSS variables allows you to change the themes dynamically. As far as I know, there's not a way to do this in the Tailwind config alone.

    • @md.mohiulislam6516
      @md.mohiulislam6516 ปีที่แล้ว

      @@SkiesDev what do you mean by dynamicaly? what is dynamic theme changing?

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

      @@md.mohiulislam6516 Like in the video how I can create buttons that let the user change the theme in the app.