Tru Narla: Building a design system in Next.js with Tailwind

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024
  • Learn how to set up a design system in a Next.js application, and how to build an accessible and easily customizable user interface with Tru Narla, Software Engineer at Discord.
    Design at the moment of inspiration: vercel.fyi/WEI...
    Speaker: / trunarla

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

  • @rodz
    @rodz ปีที่แล้ว +6

    Bruh, you all are trying hard to make her feel smaller. Try gifting our community by mentoring instead of BSing in the comments. Why would your 9yo career inflate your ego so much when you aren’t mentoring others with your senior knowledge?
    Great job Mewtru 💪🏻

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

      thank you haha :D!

  • @mewtru
    @mewtru ปีที่แล้ว +52

    Hi everyone! It’s Tru from the video! I’ll have a repo up soon so you can take a look at the code :). Thank you all for watching! And for those who are opposed to tailwind, this is just one solution, and for those who are mad at the intro, what can I say I’m a popular person 😎

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

      Hey quick question how were you able to handle responsiveness as CVA itself doesn’t provide an api for it?

    • @tzlukoma
      @tzlukoma ปีที่แล้ว +3

      @@enyelsequeira3619 Tailwind can help with the responsiveness

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

      Lovely presentation! I've been playing with Tailwind a bit recently thanks to not having a project with my current company.
      This is super helpful actually!

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

      @@enyelsequeira3619 there are utility classes in Tailwind that can help you with it (sm:, md:, lg:, etc.)

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

      I know that guys. Just wondering if it would be possible like stitches, currently under their repo, it says it doesn’t support it

  • @oemeraran8183
    @oemeraran8183 ปีที่แล้ว +36

    cva was exactly the missing piece i was looking for when building components with tailwind. I was building something like this myself.

    • @DisasterQ
      @DisasterQ ปีที่แล้ว +6

      Try Windstitch.

    • @mewtru
      @mewtru ปีที่แล้ว +3

      Cva is so good!!

  • @TomNook.
    @TomNook. ปีที่แล้ว +72

    This is not vim

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

      this is true

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

      @@swig. *tru

  • @bitbybit981
    @bitbybit981 ปีที่แล้ว +23

    Thank you sooooooooooo much!! I've literally spent the last month thinking and researching ways to use tailwind as the foundation for a component library. The mention of CVA is worth the price of admission alone. Please upload a repo for this

  • @JakeJJKs
    @JakeJJKs ปีที่แล้ว +63

    I'm almost upset I haven't come across your work and online presence earlier! So much good information packed into a short span of time! Kudos

  • @connorallen162
    @connorallen162 ปีที่แล้ว +26

    Coming up with a component library that I'm happy with has been a HUGE pain, this video would have been SO helpful like 3 months ago when I decided to move off MUI. This is a great overview of the component library problem.

    • @mewtru
      @mewtru ปีที่แล้ว +4

      Thank you!!!

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

      bro i just move to MUI recently :D is it a bad decision ? i found it very simple and rich component library.

    • @rahulpatil3942
      @rahulpatil3942 ปีที่แล้ว +4

      @@bilencekic It's not bad at all. It totally depends on your use case. If your project requires you to heavily reset your chosen framework styles then you're better off building design system from scratch.

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

      @@bilencekic if you're more of a infrastruture (backend) core dev. stay with mui as it'll let you focus more on the backend and ui won't be much of a hassle. however, it'll limit your creativity. if you want complete control of you ui. build one from scratch.

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

      @@norliegh thanks man! i was thinking exactly same. I bought a MUI template from mui webpage and i can easily build all the pages i need easily including reports+ validations + day/night switch etc. Datagrid control is awesome since i deal with big size of data. Everyting is really perfect. That was the answer i need. thank you. for now product's usability is important for me :D and it gives me that much of flexibilty

  • @codewithguillaume
    @codewithguillaume ปีที่แล้ว +7

    Hello Tru! I didn’t know you but as a senior FE Engineer I clearly recognized your expertise and knowledge. Will follow you for sure ! Best

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

      Thank you so much :)!! Means a lot

  • @DavidWMiller
    @DavidWMiller ปีที่แล้ว +3

    Not sure if I hate this or not yet, but this is a damn good talk, good shit.

  • @diegocamera898
    @diegocamera898 ปีที่แล้ว +3

    Very good talk, Could we have the URL for the repo?

  • @demiann4160
    @demiann4160 ปีที่แล้ว +7

    Great video! I'm always struggling into decide if using a well testes open source UI components library like Chakra, Mantine, Mui, or to develop one from scrath.
    What's stand in front to go from the scratch solution is a lot of UI components library are not giving you styles but sometimes accesibility, community approved UX patterns, accesibility, hooks (if React) and help you in building complex components (for eg, a calendar picker). Even with this drawbacks would you consider going scratch? I like the mix approach of RadixUI plus Tailwind but I heard from people having problems integrating Tailwind with Radix. Another mix choice would be using TailwindUI components which is kind of a rich extension of what Headless UI is. This is topic for me that I don't have a definitive choice fir sure.

  • @charles_hacks
    @charles_hacks ปีที่แล้ว +3

    Can you please share a link to this codebase?

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

    I use this path alias
    {
    "paths": {
    "@/*": ["src/*"]
    }
    }
    So i don't have to care about path alias when renaming, making or deleting a directory

  • @mihir5846
    @mihir5846 ปีที่แล้ว +3

    Would love to see this with NextJs13’s new app folder structure. Also link to this codebase please.

  • @NammaPayakaDiaries
    @NammaPayakaDiaries ปีที่แล้ว +21

    Cringe intro

    • @texoport
      @texoport ปีที่แล้ว +10

      @@PhilippBlum Or, you know, it could be an attempt at humor. Turns out women like irony just as much as us.

    • @mewtru
      @mewtru ปีที่แล้ว +4

      Bruh I’m just having fun over here 😂

    • @mewtru
      @mewtru ปีที่แล้ว +4

      @@PhilippBlum don’t be cringe 😂

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

    Like for CVA, great library 🔥

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

    WHY HAVE I NOT HEARD ABOUT CLSX

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

    The idea is really cool, but tailwind has really bad readability x_x. I use it just for small stuff, but for a whole Design System, I still prefer to use a lib that keeps closer to CSS syntax.

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

    Really loved the content. I could understand everything properly.

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

    🎯 Key Takeaways for quick navigation:
    00:08 🌟 *Introducción a Design Systems en Next.js con Tailwind*
    - Definición de un sistema de diseño.
    - Opciones para implementar sistemas de diseño: bibliotecas preconstruidas vs. crear uno propio.
    02:03 🎨 *Personalización de Tailwind CSS para el sistema de diseño*
    - La flexibilidad de Tailwind CSS para personalizar estilos.
    - Ejemplo de personalización del color de la marca en Tailwind.
    03:28 ♿ *Consideraciones de accesibilidad en el diseño del sistema*
    - Uso de bibliotecas de accesibilidad como Headless UI.
    - Importancia de la accesibilidad en el desarrollo de componentes de diseño.
    05:25 🔗 *Integración de TypeScript, Alias de Ruta y Storybook*
    - Uso de TypeScript con alias de ruta para componentes de diseño.
    - Implementación de Storybook para probar componentes de diseño de manera aislada.
    06:52 🚀 *Demostración práctica del sistema de diseño en Next.js*
    - Visualización y personalización de botones con Class Variants Authority (CVA) y Tailwind CSS.
    - Uso de componentes accesibles con Headless UI en la demo.
    13:17 👋 *Cierre y recursos adicionales*
    - Información de contacto y redes sociales del presentador.
    - Finalización de la conferencia sobre sistemas de diseño en Next.js con Tailwind.
    Made with HARPA AI

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

    Seems like a okaish way, i would prefer to build the components with scss or postcss with classname and variant utility function predefined in my utils file.
    Why to junk up the js bundle for this simple thing. Keep in mind ive use material, chakra etc too. I can use tailwind if i dont wanna spend time on creating the design system.

  • @zl9o1
    @zl9o1 ปีที่แล้ว +3

    CSV looks amazing. I’m always in trouble handle all the props and style variations. Thanks for sharing! I’m chillin on my couch but now I have to try this things out 😂

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

    There are two types of people
    - Those who love Tailwind
    - Those who hated Tailwind but now love it

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

      I still don't love it ahhaah but I can see the benefit in certain use cases!

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

      Still hate it. Ugly markup. Non contextual classes. Need to configure a lot of shit just to have granular control of a custom figma design, which already have most of the CSS given to you.

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

    You basically saved my job. Thankyou 😭❣💯

  • @Otomega1
    @Otomega1 ปีที่แล้ว +7

    What developers wants isn't features, they want order and neatness

  • @a89529294
    @a89529294 ปีที่แล้ว +3

    Vim?

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

    Thank you

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

    Very helpful ty

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

    Really cool, definitely going to try CVA, is there an example project you can share?

  • @CaliburPANDAs
    @CaliburPANDAs ปีที่แล้ว +4

    Just use CSS modules

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

      I’m trying to be convinced that there’s a better pattern than CSS Modules but haven’t found anything better yet. I’m someone who likes going easy on the utility classes so I’m biased.

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

    Thanks for video. Really informative.

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

    Great content 💯. BTW does anyone know what font is that ?

  • @Gumshoe21
    @Gumshoe21 ปีที่แล้ว +3

    This is awesome, I never thought about organizing my Tailwind work this way. Thanks! 🤟

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

      Thank you so much :)

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

    Hi
    I see on your storybook that you have null value for button variants under controls. I'm also having it in my storybook, but example button doesn't have that.
    This comes from inferring CVA props into button. How can I either remove that null value from Storybook controls, or when clicked to fallback to default value?
    An shouldn't those inferred types be strict, not involving null and undefined?
    Thank you

  • @bramreinold
    @bramreinold 17 วันที่ผ่านมา

    Hi, what chair are you using?

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

    cva is the same as vinpac/windstitch

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

    Source code ?

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

    jump cuts, jump cuts, jump cuts. Informative video though :)

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

    I know I’m a little late, I’ve been busy, but this is amazing!

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

    shadcn, hah?

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

    thank you so much

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

    not gonna lie, the whole tsx/react code makes tailwind seem way more over-complex than it is.

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

    Amazing presentation ❤❤

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

    This is a truly cool video)
    Do you use the "tailwind-merge" package?

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

    great video
    this offers some nice tools for working with tailwindcss that i missed from theme-ui.
    thanks for sharing.

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

    So good. Trying to study and get into frontend devrel. Had no idea about Storybook and that would help so much with large, data-dependent apps.

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

    I really like your way of teaching

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

    Finally chanced on your videos... I've been following you on Twitter. I really had a wide smile on when I saw you here...

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

    Helpful video 🚀

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

    Repo?

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

    can someone help me where i can i find a select input in tailwind, this is so much easier with tools like select2 with jquery, i really like to use tailwind, but the overwhelming of creating everything from scratch is killing me

  • @DiegoOliveira-ow1np
    @DiegoOliveira-ow1np ปีที่แล้ว +1

    Amazing content! I loved how much you can do with Tailwind and cva integrated with Typescript autocomplete.

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

    love these videos, thx for the great content!!!

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

    cva looks nice, but is there a way to get tailwindcss intellisense working with it?

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

      Yes, you can find a regex on the README

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

      @@rodz what regex would you use? the variants don’t have any pattern to them

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

    whats the diff between Tailwind Variants and CVA?

  • @Balance-8
    @Balance-8 ปีที่แล้ว +1

    is the repo available to the public?

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

    Veré very good video
    What is tour vscode theme?

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

    Awesome! Thanks! This taught me a lot!

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

    Banger talk

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

    Thank you Tru! Is it possible to fork this project?

  • @yusuphh.kajabukama4029
    @yusuphh.kajabukama4029 ปีที่แล้ว

    Thank you @Narla for this amazing content, very helpful, I really liked the vscode theme you are using, very pleasing, what's it name if you dont mind

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

    Learned a lot

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

    Tailwind is now supported in turbopack?

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

    With next.js?

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

    how do you add nextjs font api to my variants?

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

    Please give us more info on this. I have been looking for such for a long time. BIG THANK YOU!!!

  • @user-vr9jq5xk3m
    @user-vr9jq5xk3m ปีที่แล้ว

    How does the bundling work as a library (monorepo or independent repo)? Does it include all the components not required for the page, or only load components required for that page?

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

    This is a so influential video for me. I'll use these for every project now

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

    that was awesome thanks shed some good light on how tailwind could really help, it just seems so convoluted for writing just css but I guess you get use to it

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

    thank you so much. between you and lee you guys are giving out incredible information. so greatful

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

    Anyone know the vscode theme name?

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

    can i get your repo pls.. then it will be easy to make our own from the base of yours

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

    I learned a lot of cool tips, thanks

  • @mr.random8447
    @mr.random8447 ปีที่แล้ว

    Why use this cva over stitchesjs?

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

    This content is insane! After watching this I feel like I've been living under a rock...

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

    Can you please do a demo on setting up Tailwind on Blazor?

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

    I watched your video... double-blined over clsx, gasped at cva and said 'oh daaaamn' at the Zod usages. Really great video. Love your energy, insight, style, and tutorial. Super job.

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

    This is so money. Thanks for sharing!

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

    Great intro to CVA, thank you so much!

  • @ste-fa-no
    @ste-fa-no ปีที่แล้ว

    Storywhaaat? 🤯 very cool!

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

    My gawd. I serious need this.

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

    @mewtru I was facing issues with variants when I tried building components with tailwindcss few months back, this video was helpful, will be following up your work

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

    7:04 Actual demo of CVA.

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

    Great. Thanks for sharing.

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

    This is great! Is it possible to make it a NPM package?

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

    Where is the git for this??

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

    can you provide github repo for it?

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

    I feel so outdated when people use Typescript nowadays.

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

      I feel so outdated when people use JavaScript nowadays.

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

    Where can I read more about cva?

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

    Top notch content. Thank you so much!

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

    Amazing video! Is there any way to use cva for disabled/loading button states?

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

    damn no link to creator in description

  • @t3ntube357
    @t3ntube357 ปีที่แล้ว +13

    The video title should be "why I like Tailwind more", I thought she will show us how to structure a design system / best practices or something like that with Next.js

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

      Did you not listen for more than 2 mins?

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

      There’s more here than just tailwind

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

    Beautiful explanation.

  • @SR-ti6jj
    @SR-ti6jj ปีที่แล้ว

    Wow!

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

    Why nit scss or sass😭

  • @james.restall
    @james.restall ปีที่แล้ว +2

    Great presentation, cva is a game changer for keeping the design system maintainable.

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

    Excellent talk

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

    The ButtonOrLink component is seriously the best takeaway from this video! Thanks so much, I was banging my head on the desk for ages trying to come up with the best way of solving this.

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

      She never talked about it though... I need to figure out how it works.

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

    Do you know what concept I can study to understand how your 'ButtonOrLinkProps' are just "basic button props" (mentioned at 8:39 )? I'm not too learned in typescript and props, so getting 'className' to apply to the button (not throw errors) is proving beyond my declarative capabilities in my own speculative version of your "ButtonOrLink.tsx" import and what it contains.
    Thanks for this great overview it really tied a lot of things together for me, and storybook is great.

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

      ButtonOrLinkProps are basically types for a normal button which are then extended by Varient props.