Introduction

Slate is a set of beautifully designed, accessible Blade components. Works with Laravel and Livewire. Open Source. Open Code.

This is not a component library. It is how you build your component library.

You know how most traditional component libraries work: you install a package, import the components, and use them in your app.

This approach works well until you need to customize a component to fit your design system. Often, you end up wrapping library components, writing workarounds to override styles, or mixing APIs that don’t fit.

This is what Slate aims to solve. It is built around the following principles:

  • Open Code: The top layer of your component code is open for modification.
  • Composition: Every component uses a common, composable interface.
  • Beautiful Defaults: Carefully chosen default styles, so you get great design out of the box.
  • Livewire-ready: Validation and loading without a React rewrite.
  • AI-Ready: Open code for LLMs to read, understand, and improve.

What is Slate 3.x?

3.x is the stable line:

  • Anonymous Blade components — no PHP classes, templates you can copy and customize
  • OKLCH tokens — --slate-* CSS variables mapped into Tailwind theme colors
  • Native-first forms — accessible inputs, selects, checkboxes, switches, and radios
  • Livewire-aware — validation errors and loading states without tight coupling
  • Alpine where needed — dark mode toggle, dialogs, and other interactive overlays

Core principles

Semantic tokens, not hard-coded colors

Components use Tailwind semantic utilities like bg-primary, text-muted-foreground, and border-input. Under the hood, those map to --slate-* variables you can override.

Variants over raw colors

Use component variants instead of picking colors directly:

example.blade.php
<x-slate::button variant="default">Save</x-slate::button>
<x-slate::button variant="destructive">Delete</x-slate::button>
<x-slate::button variant="outline">Cancel</x-slate::button>

Composition for forms

Wrap controls with the field system for labels, descriptions, and errors:

example.blade.php
<x-slate::field name="email">
    <x-slate::field-label for="email">Email</x-slate::field-label>
    <x-slate::input id="email" name="email" type="email" />
    <x-slate::field-error name="email" />
</x-slate::field>

Requirements

  • PHP 8.3+
  • Laravel 12.0+
  • Tailwind CSS v4
  • Alpine.js (bundled with Livewire; required for dark-mode-toggle)

Preview

example.blade.php
<div class="flex flex-wrap gap-2">
    <x-slate::button>Default</x-slate::button>
    <x-slate::button variant="secondary">Secondary</x-slate::button>
    <x-slate::button variant="outline">Outline</x-slate::button>
    <x-slate::button variant="destructive">Destructive</x-slate::button>
</div>

Next steps

Last updated . · Legal