Tailwind comes indeed with an amazing default design system. However, if you want to make a website that stands out, you will want to customize the colors and breakpoints to match your particular brand identity.
In this guide, you will learn how to:
Using your brand’s color palette helps:
First, install Tailwind in your project:
npm install -D tailwindcss
npx tailwindcss init
This will generate a tailwind.config.js
file where you’ll configure your theme.
Open tailwind.config.js
and use the extend
property to add your brand colors:
export default {
theme: {
extend: {
colors: {
brand: {
light: '#A7F3D0',
DEFAULT: '#10B981',
dark: '#065F46',
},
},
},
},
}
Now, you can use these colors in your HTML code:
<button class="bg-brand hover:bg-brand-dark text-white py-2 px-4 rounded">
Buy Now
</button>
Tailwind’s default breakpoints are:
sm
: 640pxmd
: 768pxlg
: 1024pxxl
: 1280px2xl
: 1536px To customize them, add a screens
section:
export default {
theme: {
extend: {
colors: {
// your colors here
},
},
screens: {
sm: '500px',
md: '768px',
lg: '1100px',
xl: '1400px',
'2xl': '1600px',
},
},
}
You can now use these custom breakpoints like this:
<div class="text-sm md:text-base lg:text-lg">
Responsive text size
</div>
Use Tailwind Play or the local dev server can be used to see your custom styles in action.
“Tip: Always try to have your design tokens line up with your brand guidelines, or some random inconsistencies will come about.”
brand
instead of color names (e.g., green
).Customizing TailwindCSS really opens the door for truly personalizing a site. A few changes in the configuration file really go a long way in turning your project into a branded, cohesive experience.
Want to generate TailwindCSS components in seconds? Try TailwindGenAI to convert natural language prompts into production-ready Tailwind code.
Get Started