Installation
Add UI Lab to any Tailwind v4 project in under one minute.
Choose your path
Fastest: Start from a template. Browse pre-built Starters—Next.js, Vite, Astro, Tauri, and more. Clone, install, build. Everything's configured.
Quick: Use the CLI. One command sets up UI Lab in an existing project:
Manual: Full control. Follow the steps below for custom setups.
Interactive Installation
Step-by-step guidance for your framework:
Target framework
Installation Steps
1. Install core package
2. Extend Tailwind content paths
3. Add root theme (globals.css or equivalent)
4. Import stylesheet in root layout/entry
Verification
Start your dev server and render a test component:
No runtime errors and correct styling confirms successful installation.
Manual Installation
Install
Import styles
Add this to your root layout (app/layout.tsx in Next.js, main.tsx in Vite).
Use components
Troubleshooting
Styles look wrong or missing
Verify Tailwind v4:
Should show v4.x.x. If not: npm install tailwindcss@latest
PostCSS error
Check postcss.config.mjs includes:
Restart dev server after changes.
Styles still not applying
- Clear cache:
rm -rf node_modules/.cache && npm run dev - Verify style import exists in your root layout file
Still stuck?
Compare against the Components gallery. File issues on GitHub.
Next steps
- Browse Components for the full library
- Explore Elements for composed UI patterns
- Check Starters for complete project templates