Installation
This guide walks through installing Slate 3.x in a Laravel 12+ application with Tailwind CSS v4.
Prerequisites
- PHP 8.3 or higher
- Laravel 12.0+ (Laravel 13 when available)
- Composer
- Node.js and npm
- Tailwind CSS v4 configured in your project
Step 1: Install via Composer
Install the 3.x development branch:
Step 2: Import Slate CSS
Copy or reference Slate's stylesheet, then import it after Tailwind in your resources/css/app.css:
slate.css ships with:
- Slate-owned OKLCH tokens (
--slate-*) - Tailwind v4
@theme inlinemappings (bg-background,text-foreground, etc.) - A
@sourcedirective that scans Slate Blade components for class names
Import order matters: Tailwind first, then slate.css.
Optional: Typography plugin
If you render markdown/prose content, add the typography plugin:
Step 3: Scan your app templates
Make sure Tailwind scans your Blade views (and Slate's views if you vendor-copy components):
Step 4: Build assets
Or during development:
Step 5: Use components
Components are registered automatically via Slate's service provider:
Verify the install
- Add a test route:
- Create
resources/views/test-slate.blade.php:
- Visit
/test-slate— you should see a styled button.
Troubleshooting
Components not styled
- Run
npm run buildornpm run dev - Confirm
slate.cssis imported after@import 'tailwindcss' - Confirm
@sourceincludes Slate's Blade views
Dark mode
Toggle the .dark class on <html>. Use <x-slate::dark-mode-toggle /> or your own theme switcher.