Tailwind CSS
Learn how to use Tailwind CSS v4 in your Bini.js application with zero configuration.
Tailwind CSS v4 is the default styling option in Bini.js. It's pre-configured using the official Vite plugin — no PostCSS configuration needed.
@tailwindcss/vite plugin. Everything works out of the box — no postcss.config.js or tailwind.config.js required.Setup
When you create a new Bini.js project with Tailwind, everything is configured automatically:
Basic Usage
Use Tailwind's utility classes directly in your components:
Tailwind CSS v4 Features
| Feature | Description |
|---|---|
| Vite Plugin | Native Vite integration — no PostCSS config needed |
| CSS-first config | Configure via CSS variables instead of JS |
| Lightning CSS | Faster builds with Lightning CSS |
| Simplified setup | Just @import "tailwindcss" — that's it |
Theming with CSS Variables
Tailwind v4 uses CSS variables for theming:
Responsive Design
Use Tailwind's responsive prefixes to adapt your layout:
| Breakpoint | Min Width |
|---|---|
| sm | 640px |
| md | 768px |
| lg | 1024px |
| xl | 1280px |
| 2xl | 1536px |
Dark Mode
Use the dark: variant for dark mode:
Custom Utilities
Create custom utilities using @utility: