Intro to Styling Custom UIs with Tailwind Utility Classes

InstructorSam Selikoff

Share this video with your friends

Send Tweet

Tailwind comes with pre-built, single-purpose CSS classes called utility classes that you use to style your application. If you’ve never used a utility-first approach before, you’ll be surprised at just how far you can get building a completely custom UI using only Tailwind’s defaults.

In this lesson we’ll style a message component from Discord. You’ll see how Tailwind lets us tweak our design directly from our template, all without having to write a single line of CSS ourselves. Because Tailwind’s utility classes live right alongside our markup, we won’t need to come up with any new naming patterns or conventions to keep our styling code maintainable.

This co-location of styles and markup is one of the biggest benefits of Tailwind, since it lets teams decide for themselves how best to break up their UIs – and their Tailwind styling code simply comes along for the ride.

Alex
~ 3 years ago

Curios, is it possible to get rundown of what plugins are you using in your VSCode (at least it appears you do use VSCode).

Sam Selikoffinstructor
~ 3 years ago

Absolutely, the main ones are

  • Tailwind CSS IntelliSense https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss
  • Headwind (class sorter) https://marketplace.visualstudio.com/items?itemName=heybourn.headwind
  • Prettier - Code formatter https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
  • Auto Rename Tag https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag
  • Vim https://marketplace.visualstudio.com/items?itemName=vscodevim.vim