How to create Tailwind CSS Button Components

preview_player
Показать описание

In this guide, we take a look at creating button components using Tailwind CSS. Combined with PostCSS we can craft custom component-based classes that group Tailwind CSS classes for the most reusability.

### Tailwind JIT

Very recently Tailwind Labs released a new JIT feature which I take for a test drive in this guide. It's great and fast which is something the framework has been suffering from given the size of CSS files it ships with by default. Follow along with the guide to see how to configure and set up a new JIT-based project.
Button components

The purpose of this tutorial is to walk through some use cases for creating buttons and button variants using Tailwind CSS. I tend to create a design system for larger projects that require it. This system thus paves the way for the design throughout the rest of the project.

Shifting your mindset out of designing "pages" into designing "systems" takes some getting used to as a designer/developer. You'll want to decide as much as you can up front after some experimentation. Everything from font sizes to color is considered. Buttons are a big part of that system as they tend to represent the brand and call to action for important interactions.

Join this channel to get access to perks:

♥️ Sponsor me on GitHub

☕️ Keep me awake. Buy me a coffee

📰 One-Click Subscribe:

💻 Previously published at:

💎Ruby on Rails Course: HELLO RAILS

💻 Check out the blog:

🦄 Check out my personal site:

🚀 Links:

📘Check out my book on UX Design:
"LUXD: Learn User Experience Design"

📙 Check out my FREE book on Tumblr Theming:
"Pro Tumblr Theming"
Рекомендации по теме
Комментарии
Автор

Hey all! I had a slew of audio issues in this one. Sorry in advance 😬.

Webcrunch
Автор

Excellent tutorial regarding how to create Tailwind CSS Button Components

dalestewart
Автор

thx for the tut. The only suggestion I would make is to put your colors in the theme that way you can refer to them anywhere and only have to update them one place if something changes.

OneBrighDay
Автор

Super helpful video, nice work. What theme are you using for VS Code?

willisvt
Автор

How do you add a ripple style effect to the buttons?

chunkycheese
Автор

What a cool mountain animation in the intro. Is it open source? =)

littlesandra
Автор

Great one, but why not use component tag and props to render different button?!

RomeoKhazalia
Автор

My teacher!
Please teach me that it has video like netflix ruby on rails Sir!!!

hallelujah_japan