# Electrik Slate > Slate is a shadcn-inspired Laravel Blade UI kit: anonymous components, Tailwind CSS v4, Slate-owned OKLCH tokens, Alpine where needed, and Livewire-aware forms. Package: `electrik/slate` (3.x). Docs: https://slate.electrik.dev ## Get started - [Introduction](https://slate.electrik.dev/docs/getting-started/introduction): What Slate is and who it is for. - [Installation](https://slate.electrik.dev/docs/getting-started/installation): Composer require + CSS import. - [Philosophy](https://slate.electrik.dev/docs/philosophy): Progressive props, anonymous Blade, no fake CLI. - [Design tokens](https://slate.electrik.dev/docs/design-tokens): `--slate-*` OKLCH variables and Tailwind mappings. - [API freeze](https://slate.electrik.dev/docs/api-freeze): Frozen progressive props, toast event, token names. - [Form matrix](https://slate.electrik.dev/docs/form-matrix): Controls × label / description / errorMessage × Livewire. - [Livewire](https://slate.electrik.dev/docs/livewire): Validation, loading, and toast patterns. - [AI & MCP](https://slate.electrik.dev/docs/ai): llms.txt, MCP server, Cursor rules. - [Changelog](https://slate.electrik.dev/changelog): Release notes. ## Galleries - [Components](https://slate.electrik.dev/components): All shipped component docs with live previews. - [Blocks](https://slate.electrik.dev/blocks): Copy-ready Blade sections. - [Themes](https://slate.electrik.dev/themes): Token playground and accent presets. - [Examples](https://slate.electrik.dev/examples): Full-page auth, dashboard, and landing. ## Components - [Button](https://slate.electrik.dev/components/button.md): Displays a button or a component that looks like a button. - [Badge](https://slate.electrik.dev/components/badge.md): A small flat label for status, counts, and categories. - [Card](https://slate.electrik.dev/components/card.md): A flexible container with header, content, and footer sections. - [Alert](https://slate.electrik.dev/components/alert.md): Displays a callout for user attention. - [Separator](https://slate.electrik.dev/components/separator.md): Visually or semantically separates content. - [Avatar](https://slate.electrik.dev/components/avatar.md): An image element with a fallback for representing a user. - [Skeleton](https://slate.electrik.dev/components/skeleton.md): Use to show a placeholder while content is loading. - [Dialog](https://slate.electrik.dev/components/dialog.md): A modal dialog that interrupts the user with important content. - [Tabs](https://slate.electrik.dev/components/tabs.md): A set of layered sections of content displayed one at a time. - [Spinner](https://slate.electrik.dev/components/spinner.md): A spinning indicator for loading states. - [Breadcrumb](https://slate.electrik.dev/components/breadcrumb.md): Displays the path to the current resource using a hierarchy of links. - [Progress](https://slate.electrik.dev/components/progress.md): Displays an indicator showing the completion progress of a task. - [Kbd](https://slate.electrik.dev/components/kbd.md): Displays a keyboard key or shortcut. - [Aspect Ratio](https://slate.electrik.dev/components/aspect-ratio.md): Displays content within a desired ratio. - [Tooltip](https://slate.electrik.dev/components/tooltip.md): A popup that displays information related to an element when hovered or focused. - [Collapsible](https://slate.electrik.dev/components/collapsible.md): An interactive component which expands/collapses a panel. - [Accordion](https://slate.electrik.dev/components/accordion.md): A vertically stacked set of interactive headings that each reveal a section of content. - [Popover](https://slate.electrik.dev/components/popover.md): Displays rich content in a portal-like panel anchored to a trigger. - [Toggle](https://slate.electrik.dev/components/toggle.md): A two-state button that can be either on or off. - [Toggle Group](https://slate.electrik.dev/components/toggle-group.md): A set of two-state buttons that can be toggled on or off. - [Empty](https://slate.electrik.dev/components/empty.md): Use to display an empty state when there is no content. - [Slider](https://slate.electrik.dev/components/slider.md): An input where the user selects a value from within a given range. - [Pagination](https://slate.electrik.dev/components/pagination.md): Pagination with page navigation, next and previous links. - [Table](https://slate.electrik.dev/components/table.md): A responsive table component. - [Hover Card](https://slate.electrik.dev/components/hover-card.md): For sighted users to preview content available behind a link. - [Alert Dialog](https://slate.electrik.dev/components/alert-dialog.md): A modal dialog that interrupts the user with important content and expects a response. - [Sheet](https://slate.electrik.dev/components/sheet.md): Extends the dialog component to display content that complements the main content of the screen. - [Scroll Area](https://slate.electrik.dev/components/scroll-area.md): Augments native scroll functionality for custom, cross-browser styling. - [Button Group](https://slate.electrik.dev/components/button-group.md): A container that groups related buttons together. - [Dropdown Menu](https://slate.electrik.dev/components/dropdown-menu.md): Displays a menu to the user — such as a set of actions or functions — triggered by a button. - [Input](https://slate.electrik.dev/components/input.md): Displays a form input field or a component that looks like an input field. - [Textarea](https://slate.electrik.dev/components/textarea.md): A multiline text input with the same density and validation semantics as input. - [Select](https://slate.electrik.dev/components/select.md): A native select control with semantic styling and placeholder support. - [Checkbox](https://slate.electrik.dev/components/checkbox.md): A native checkbox with custom styling and validation-aware states. - [Switch](https://slate.electrik.dev/components/switch.md): A native checkbox rendered as an accessible switch. - [Radio](https://slate.electrik.dev/components/radio.md): A native radio input with custom styling. - [Field](https://slate.electrik.dev/components/field.md): Composition helpers for labels, descriptions, and validation messages. - [Dark mode toggle](https://slate.electrik.dev/components/dark-mode-toggle.md): Toggle light and dark themes by switching the .dark class on html. - [Radio Group](https://slate.electrik.dev/components/radio-group.md): A fieldset-like group for selecting a single option from related radio buttons. - [File Input](https://slate.electrik.dev/components/file-input.md): A styled file upload control with progressive label, description, and error support. - [Form](https://slate.electrik.dev/components/form.md): A simple form wrapper with consistent vertical spacing. - [Rating](https://slate.electrik.dev/components/rating.md): An interactive star rating control powered by Alpine.js. - [Timeline](https://slate.electrik.dev/components/timeline.md): Display a chronological sequence of events with indicators and content. - [Stepper](https://slate.electrik.dev/components/stepper.md): A multi-step progress indicator with active, complete, and inactive states. - [Marquee](https://slate.electrik.dev/components/marquee.md): An infinitely scrolling content strip with CSS animation. - [Drawer](https://slate.electrik.dev/components/drawer.md): A panel that slides in from an edge, defaulting to the bottom of the screen. - [Carousel](https://slate.electrik.dev/components/carousel.md): A slideshow for cycling through content with previous and next controls. - [Resizable](https://slate.electrik.dev/components/resizable.md): Adjustable panel layouts with draggable handles. - [Context Menu](https://slate.electrik.dev/components/context-menu.md): A menu triggered by right-click, positioned at the cursor. - [Command](https://slate.electrik.dev/components/command.md): A searchable command palette list for quick actions and navigation. - [Combobox](https://slate.electrik.dev/components/combobox.md): An autocomplete input with a filterable listbox of options. - [Calendar](https://slate.electrik.dev/components/calendar.md): A simple month grid date picker with previous and next navigation. - [Menubar](https://slate.electrik.dev/components/menubar.md): A horizontal menu bar with dropdown submenus, one open at a time. - [Navigation Menu](https://slate.electrik.dev/components/navigation-menu.md): A site navigation component with hover and click dropdown panels. - [Sidebar](https://slate.electrik.dev/components/sidebar.md): A collapsible application sidebar with menu items and inset content area. - [App Shell](https://slate.electrik.dev/components/app-shell.md): A simple application layout with optional header, sidebar, and main content slots. - [Chart](https://slate.electrik.dev/components/chart.md): A minimal CSS bar chart from JSON data or composed bar slots. - [Spotlight](https://slate.electrik.dev/components/spotlight.md): A decorative radial gradient that follows the mouse cursor. - [Toast](https://slate.electrik.dev/components/toast.md): Temporary notifications that slide in from a screen edge. ## Blocks - [Login](https://slate.electrik.dev/blocks/login): Email and password sign-in card on a muted canvas. (Auth) - [Register](https://slate.electrik.dev/blocks/register): Create-account form with terms checkbox. (Auth) - [Settings](https://slate.electrik.dev/blocks/settings): Profile fields, notification switches, and a danger zone. (Application) - [App shell](https://slate.electrik.dev/blocks/app-shell): Header, collapsible sidebar, and main workspace. (Application) - [Empty state](https://slate.electrik.dev/blocks/empty-state): Centered empty composition with media, copy, and actions. (Application) - [Pricing](https://slate.electrik.dev/blocks/pricing): Three-tier pricing strip with badges and CTAs. (Marketing) - [Form validation](https://slate.electrik.dev/blocks/form-validation): Progressive field errors for static and Livewire-style demos. (Forms) - [Toast action](https://slate.electrik.dev/blocks/toast-action): Card that dispatches slate-toast events from a button. (Feedback) - [Hero](https://slate.electrik.dev/blocks/hero): Centered marketing hero with dual CTAs. (Marketing) ## Examples - [Login](https://slate.electrik.dev/examples/login): Full-page sign-in for an auth flow. - [Register](https://slate.electrik.dev/examples/register): Full-page account creation. - [Dashboard](https://slate.electrik.dev/examples/dashboard): Simple metrics grid and quick actions. - [Landing](https://slate.electrik.dev/examples/landing): Marketing landing with hero and feature strip. ## Machine-readable - [llms.txt](https://slate.electrik.dev/llms.txt): This index. - [llms-full.txt](https://slate.electrik.dev/llms-full.txt): Index plus concatenated markdown docs. - Prefer `.md` URLs for component pages when pasting into models. --- # Full documentation dump Below is concatenated markdown from the docs site. Prefer individual `.md` URLs when possible. --- Source: https://slate.electrik.dev/docs/getting-started/introduction.md --- title: "Introduction" description: "What is Slate UI Kit 3.x?" sidebar_order: 2 sidebar_section: "Getting Started" --- # Introduction Slate UI Kit is a set of anonymous Blade components for Laravel — built with **Tailwind CSS v4** and Slate-owned design tokens. ## What is Slate 3.x? 3.x is a ground-up rebuild focused on getting the foundation right: - **Anonymous Blade components** — no PHP classes, pure 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 The current alpha ships core primitives: actions, form controls, field helpers, card, alert, avatar, skeleton, dialog, and more. Additional surfaces continue to land on `3.x`. ## 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: @verbatim Save Delete Cancel @endverbatim ### Composition for forms Wrap controls with the field system for labels, descriptions, and errors: @verbatim Email @endverbatim ## Requirements - PHP 8.3+ - Laravel 12.0+ - Tailwind CSS v4 - Alpine.js (bundled with Livewire; required for `dark-mode-toggle`) ## Preview @verbatim
Default Secondary Outline Destructive
@endverbatim
## Next steps - [Installation](/docs/getting-started/installation) - [Design tokens](/docs/design-tokens) - [Components](/components) --- Source: https://slate.electrik.dev/docs/getting-started/installation.md --- title: "Installation" description: "Install Slate UI Kit 3.x in your Laravel application" sidebar_order: 3 sidebar_section: "Getting Started" --- # 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: @verbatim composer require electrik/slate:dev-3.x @endverbatim ## Step 2: Import Slate CSS Copy or reference Slate's stylesheet, then import it **after** Tailwind in your `resources/css/app.css`: @verbatim @import 'tailwindcss'; @import '../../vendor/electrik/slate/resources/css/slate.css'; @endverbatim `slate.css` ships with: - Slate-owned OKLCH tokens (`--slate-*`) - Tailwind v4 `@theme inline` mappings (`bg-background`, `text-foreground`, etc.) - A `@source` directive 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: @verbatim @plugin '@tailwindcss/typography'; @endverbatim ## Step 3: Scan your app templates Make sure Tailwind scans your Blade views (and Slate's views if you vendor-copy components): @verbatim @source '../**/*.blade.php'; @source '../**/*.js'; @source '../../vendor/electrik/slate/resources/views/**/*.blade.php'; @endverbatim ## Step 4: Build assets @verbatim npm run build @endverbatim Or during development: @verbatim npm run dev @endverbatim ## Step 5: Use components Components are registered automatically via Slate's service provider: @verbatim Click me @endverbatim ## Verify the install 1. Add a test route: @verbatim Route::get('/test-slate', fn () => view('test-slate')); @endverbatim 2. Create `resources/views/test-slate.blade.php`: @verbatim Test Button @endverbatim 3. Visit `/test-slate` — you should see a styled button. ## Troubleshooting ### Components not styled - Run `npm run build` or `npm run dev` - Confirm `slate.css` is imported **after** `@import 'tailwindcss'` - Confirm `@source` includes Slate's Blade views ### Dark mode Toggle the `.dark` class on ``. Use `` or your own theme switcher. ## Next steps - [Introduction](/docs/getting-started/introduction) - [Design tokens](/docs/design-tokens) - [Components](/components) --- Source: https://slate.electrik.dev/docs/philosophy.md --- title: "Philosophy" description: "The design principles and philosophy behind Slate UI Kit" sidebar_order: 1 sidebar_section: "Core Concepts" --- # Philosophy Slate is built on a simple philosophy: **your UI should belong to you**. ## Open code Slate follows an open-code approach: - You see the code - You can publish and customize components - You're never stuck with a black box ## Ownership When you install Slate, you're not installing a black box. You're getting: - **Copyable components** - All components are Blade templates you can modify - **No vendor lock-in** - If you outgrow Slate, your code still works - **Full control** - Customize, extend, or replace any component ## Unopinionated Design Slate doesn't force you into a specific design system: - No forced layouts - No admin panel abstractions - No design system lock-in - No proprietary magic You stay in control of your code. ## Open Source, Open Code Slate is open source under the MIT license. More importantly, the code is open: - All components are in your `vendor` directory - You can publish and modify them - You can see exactly how they work ## Why This Matters Traditional UI libraries lock you in. Slate gives you freedom: - **Flexibility** - Adapt components to your needs - **Transparency** - See exactly what's happening - **Independence** - Your code works even if Slate changes If you outgrow Slate, your code still works. --- Source: https://slate.electrik.dev/docs/design-tokens.md --- title: "Design Tokens" description: "Slate-owned OKLCH CSS variables and Tailwind theme mappings" sidebar_order: 5 sidebar_section: "Core Concepts" --- # Design Tokens Slate 3.x expresses design decisions as **Slate-owned CSS variables** (`--slate-*`) in OKLCH color space. Tailwind v4 theme colors map those variables so components use semantic utilities like `bg-background` and `text-primary`. Prefer clicking swatches? Open the **[Themes playground](/themes)**. Token **names** below are frozen for rename — see [API freeze](/docs/api-freeze). ## Architecture ``` --slate-* variables (OKLCH) ↓ @theme inline mappings in slate.css ↓ Tailwind utilities (bg-primary, border-input, …) ↓ Blade components ``` ## Base tokens | Token | Tailwind utility | Purpose | |-------|------------------|---------| | `--slate-background` | `bg-background` | Page background | | `--slate-foreground` | `text-foreground` | Primary text | | `--slate-card` | `bg-card` | Elevated surfaces | | `--slate-border` | `border-border` | Default borders | | `--slate-input` | `border-input` | Form control borders | | `--slate-ring` | `ring-ring` | Focus rings | | `--slate-radius` | `rounded-*` scale | Global border radius | ## Semantic colors | Token | Tailwind utility | Purpose | |-------|------------------|---------| | `--slate-primary` | `bg-primary` | Primary actions | | `--slate-secondary` | `bg-secondary` | Secondary actions | | `--slate-muted` | `bg-muted` | Subtle backgrounds | | `--slate-accent` | `bg-accent` | Hover/highlight states | | `--slate-destructive` | `bg-destructive` | Destructive actions | Foreground pairs exist for each (`--slate-primary-foreground`, etc.). ## State colors (foundation) These tokens are defined for future component variants: | Token | Purpose | |-------|---------| | `--slate-success` | Positive feedback | | `--slate-warning` | Caution states | | `--slate-info` | Informational states | | `--slate-destructive-foreground` | Text on destructive surfaces | Not all state tokens have component variants yet — they're part of the token foundation. ## Customizing Override variables after importing `slate.css`: @verbatim @import 'tailwindcss'; @import '../../vendor/electrik/slate/resources/css/slate.css'; :root { --slate-primary: oklch(0.45 0.2 260); --slate-primary-foreground: oklch(0.98 0 0); --slate-radius: 0.5rem; } .dark { --slate-primary: oklch(0.75 0.15 260); } @endverbatim ## Dark mode Dark values live under the `.dark` selector in `slate.css`. Toggle dark mode by adding/removing `.dark` on ``: @verbatim @endverbatim ## Where tokens live All defaults are in `vendor/electrik/slate/resources/css/slate.css`. Components never hard-code hex values — they use Tailwind semantic classes that resolve through the theme map. --- Source: https://slate.electrik.dev/docs/api-freeze.md --- title: "API freeze" description: "Frozen progressive props, toast event shape, and design token names for Slate 3.x" sidebar_order: 6 sidebar_section: "Core Concepts" --- # API freeze Slate `3.x` is still **alpha**, but the contracts below are **frozen for rename**. Treat them as stable for apps and agents. Other surfaces may still move and are marked **experimental** when needed. Do not rename these props, event fields, or CSS variables without a major version. ## Progressive form props (frozen) These props auto-compose `field` / `field-label` / `field-description` / `field-error` on form controls: | Prop | Role | | --- | --- | | `label` | Accessible control label | | `description` | Help text under the control | | `errorMessage` | Explicit error copy (alongside Livewire/`$errors`) | | `name` / `errorKey` | Validation key wiring | | `showError` | Whether to render the error slot (where supported) | **Frozen on:** `input`, `textarea`, `select`, `checkbox`, `switch`, `radio`, `radio-group`, `file-input`. `help` remains a **deprecated alias** of `description` on text-like controls — prefer `description`. ```blade ``` ## Toast event shape (frozen) | | | | --- | --- | | **Event** | `slate-toast` on `window` | | **Listen** | `` (`@slate-toast.window`) | **`detail` fields (frozen names):** | Field | Type | Notes | | --- | --- | --- | | `id` | `string?` | Auto-generated when omitted | | `title` | `string?` | Primary text | | `description` | `string?` | Secondary text | | `variant` | `string?` | `default` \| `destructive` \| `success` \| `warning` \| `info` | | `duration` | `number?` | ms; `0` = no auto-dismiss; default from toaster `duration` | ```js window.dispatchEvent(new CustomEvent('slate-toast', { detail: { title: 'Saved', description: 'Your changes were stored.', variant: 'success', duration: 4000, }, })) ``` Action buttons stay **compositional** (`toast-action`) — not part of the event payload. ## Design tokens (frozen names) Do not rename these `--slate-*` variables. Values may still be tuned before stable. | Group | Tokens | | --- | --- | | **Core** | `--slate-radius`, `--slate-background`, `--slate-foreground`, `--slate-card`, `--slate-card-foreground`, `--slate-popover`, `--slate-popover-foreground` | | **Brand** | `--slate-primary`, `--slate-primary-foreground`, `--slate-secondary`, `--slate-secondary-foreground`, `--slate-muted`, `--slate-muted-foreground`, `--slate-accent`, `--slate-accent-foreground` | | **Status** | `--slate-destructive`, `--slate-destructive-foreground`, `--slate-success`, `--slate-success-foreground`, `--slate-warning`, `--slate-warning-foreground`, `--slate-info`, `--slate-info-foreground` | | **Chrome** | `--slate-border`, `--slate-input`, `--slate-ring` | | **Sidebar** | `--slate-sidebar`, `--slate-sidebar-foreground`, `--slate-sidebar-accent`, `--slate-sidebar-accent-foreground`, `--slate-sidebar-border`, `--slate-sidebar-ring` | Full tables: [Design tokens](/docs/design-tokens). Playground: [Themes](/themes). ## Experimental Still free to change before stable `3.0.0`: - Calendar / combobox / chart **depth** (behavior beyond the current markup) - Nested overlay stacking edge cases beyond scroll-lock + topmost Escape - MCP tool names and response shapes (`@electrik/slate-mcp` alpha) - Block gallery markup on the docs site When a page or prop is experimental, docs say so explicitly. Prefer frozen contracts when generating Blade for consumers. ## Related - [Form matrix](/docs/form-matrix) - [Livewire](/docs/livewire) - [Accessibility](/docs/accessibility) - [Compatibility](/docs/compatibility) --- Source: https://slate.electrik.dev/docs/form-matrix.md --- title: "Form matrix" description: "Every form control with label, description, errorMessage, and Livewire wire:model" sidebar_order: 7 sidebar_section: "Core Concepts" --- # Form matrix Frozen progressive props (`label`, `description`, `errorMessage`) work the same across Slate form controls. Pair them with Livewire `wire:model` without wrapping markup by hand. See also [API freeze](/docs/api-freeze) and [Livewire](/docs/livewire). ## Matrix | Control | `label` | `description` | `errorMessage` | Livewire | | --- | --- | --- | --- | --- | | `input` | ✓ | ✓ | ✓ | `wire:model` | | `textarea` | ✓ | ✓ | ✓ | `wire:model` | | `select` | ✓ | ✓ | ✓ | `wire:model` | | `checkbox` | ✓ | ✓ | ✓ | `wire:model` | | `switch` | ✓ | ✓ | ✓ | `wire:model` | | `radio` | ✓ | ✓ | ✓ | `wire:model` | | `radio-group` | ✓ | ✓ | ✓ | `wire:model` on the group | | `file-input` | ✓ | ✓ | ✓ | `wire:model` | ## Snippets ### Input ```blade ``` ### Textarea ```blade ``` ### Select ```blade ``` ### Checkbox ```blade ``` ### Switch ```blade ``` ### Radio group ```blade ``` ### File input ```blade ``` ## Composition alternative When you need custom layout, compose the field helpers yourself: ```blade Email We will never share your email. ``` ## Sandbox The consumer smoke page and local sandbox exercise progressive props with invalid/`errorMessage` states. Prefer those pages when verifying Livewire wiring end-to-end. --- Source: https://slate.electrik.dev/docs/livewire.md --- title: "Livewire" description: "Using Slate with Laravel Livewire" sidebar_order: 4 sidebar_section: "Compatibility" --- # Livewire Slate works with Laravel Livewire out of the box — `wire:model`, validation errors, loading states, and Alpine overlays all play nicely together. ## Installation ```bash composer require livewire/livewire composer require electrik/slate ``` ## Buttons and actions ```blade {{-- resources/views/livewire/counter.blade.php --}}
Count: {{ $count }}
``` ## Form controls Progressive props (`label`, `description`, `errorMessage`) compose the field helpers automatically. Livewire validation keys are detected from `wire:model` / `name`. ```blade
Save Saving… ``` Or let Slate handle the busy UI when you use `wire:click` / `wire:submit` with `loading-text`: ```blade Save ``` For static docs demos (no Livewire), use the `loading` prop or Alpine — see [Button](/components/button). ## Toast from Livewire Mount `` once in your layout, then dispatch a browser event after an action: ```php // app/Livewire/ProfileForm.php public function save(): void { $this->validate(); // ... $this->dispatch('slate-toast', title: 'Saved', description: 'Your profile was updated.', variant: 'success', ); } ``` Livewire v3 browser events bubble as `slate-toast` with a `detail` payload — the toaster listens on `window`. You can also listen in Alpine: ```blade
``` ## Dialogs and sheets Keep Alpine state on the Slate root; call Livewire from actions inside: ```blade Delete account Cancel Delete ``` ## Best practices 1. Prefer `wire:model` / `wire:model.live` / `wire:model.blur` on Slate controls — error wiring is automatic. 2. Put one `toaster` in the layout; fire `slate-toast` from components or Alpine. 3. Don’t nest Alpine `x-data` roots that fight Livewire morphing on the same node as `wire:*`. 4. Use `wire:loading` on buttons/spinners for submit feedback. ## Related - [Toast](/components/toast) - [Input](/components/input) - [Field](/components/field) - [Livewire Documentation](https://livewire.laravel.com) --- Source: https://slate.electrik.dev/docs/ai.md --- title: "AI & MCP" description: "llms.txt, MCP server, and Cursor rules for Electrik Slate" sidebar_section: "Getting Started" sidebar_order: 45 --- # AI & MCP Slate is built so agents can read real Blade APIs instead of inventing React/shadcn. Use the docs index, the MCP server, or a Cursor rule. ## llms.txt Point tools that support [llms.txt](https://llmstxt.org/) at: - https://slate.electrik.dev/llms.txt — curated index of docs, components, blocks, and examples - https://slate.electrik.dev/llms-full.txt — index plus concatenated markdown Component pages also ship as markdown: ```text https://slate.electrik.dev/components/button.md ``` Docs page actions include **View as Markdown** and **Open in ChatGPT / Claude / v0 / Scira** with the live page URL in the prompt. ## MCP server (read-only) Slate exposes the same read-only MCP tools in two ways: 1. **Remote (Cloudflare)** — paste a URL into Cursor (no local Node process) 2. **Local (npm)** — `npx @electrik/slate-mcp` over stdio Both can: - list shipped components and blocks - fetch component docs (markdown) - fetch Blade source from the `3.x` branch on GitHub - pull `llms.txt` They do **not** install packages. Slate is Composer-based: ```bash composer require electrik/slate:^3.0@alpha ``` ### Cursor — remote MCP (recommended) After the Worker is deployed (`mcp/worker` in the Slate repo): ```json { "mcpServers": { "slate": { "url": "https://mcp.slate.electrik.dev" } } } ``` Optional custom domain later: `https://mcp.slate.electrik.dev` (configure in Cloudflare Worker settings). ### Cursor — local npm ```json { "mcpServers": { "slate": { "command": "npx", "args": ["-y", "@electrik/slate-mcp"] } } } ``` ```bash npm install -g @electrik/slate-mcp # or one-shot: npx -y @electrik/slate-mcp ``` Optional env: | Variable | Default | Purpose | | --- | --- | --- | | `SLATE_DOCS_URL` | `https://slate.electrik.dev` | Docs / markdown base | | `SLATE_SOURCE_URL` | GitHub raw `3.x` | Blade source base | ### Example prompts - List Slate form components and show me the input docs - Fetch the dialog Blade source and build a confirm flow - Use the login block pattern with progressive field props ## Cursor rule Copy [AGENTS.md](https://github.com/electrikhq/slate/blob/3.x/AGENTS.md) into your app, or add `.cursor/rules/slate.mdc` from the Slate repo. It covers progressive props, anonymous Blade, tokens, and Livewire patterns. ## Related - [Installation](/docs/getting-started/installation) - [Philosophy](/docs/philosophy) - [Blocks](/blocks) - [Components](/components) --- Source: https://slate.electrik.dev/docs/theming.md --- title: "Theming" description: "Customize Slate colors with OKLCH tokens and the live themes playground" sidebar_section: "Core Concepts" sidebar_order: 4 --- # Theming Slate 3.x themes through **Slate-owned OKLCH CSS variables** (`--slate-*`). Tailwind utilities like `bg-primary` map to those tokens. Prefer a visual tour? Open the playground: **[Themes & tokens →](/themes)** ## Quick override After importing `slate.css`, override variables in your app CSS: ```css :root { --slate-primary: oklch(0.45 0.2 264); --slate-primary-foreground: oklch(0.98 0 0); } .dark { --slate-primary: oklch(0.72 0.14 264); --slate-primary-foreground: oklch(0.2 0 0); } ``` ## Token reference See [Design Tokens](/docs/design-tokens) for the full surface / brand / status / sidebar list, nested `.light` / `.dark` islands, and architecture notes. ## Related - [Design Tokens](/docs/design-tokens) - [Customization](/docs/customization) - [Dark Mode](/docs/dark-mode) - [Themes playground](/themes) --- Source: https://slate.electrik.dev/docs/blocks.md --- title: "Blocks" description: "Reusable Blade sections composed from Slate components" sidebar_section: "Getting Started" sidebar_order: 40 --- # Blocks Blocks are copy-ready UI sections composed from Slate components — login cards, pricing strips, app shells, and more. They are examples, not installable packages. Browse the live gallery: **[Open Blocks →](/blocks)** ## What’s included | Block | Category | | --- | --- | | [Login](/blocks/login) | Auth | | [Register](/blocks/register) | Auth | | [Settings](/blocks/settings) | Application | | [App shell](/blocks/app-shell) | Application | | [Empty state](/blocks/empty-state) | Application | | [Pricing](/blocks/pricing) | Marketing | | [Form validation](/blocks/form-validation) | Forms | | [Toast action](/blocks/toast-action) | Feedback | | [Hero](/blocks/hero) | Marketing | ## How to use a block 1. Open the block preview 2. Copy the Blade from the docs site source (or adapt the pattern) 3. Paste into your Laravel view and wire forms to your routes / Livewire For full pages, see **[Examples](/examples)**. --- Source: https://slate.electrik.dev/docs/examples.md --- title: "Examples" description: "Full-page Blade examples built with Slate" sidebar_section: "Getting Started" sidebar_order: 41 --- # Examples Full-bleed pages composed from Slate primitives. Use them as starting points for auth, dashboards, and marketing. **[Open Examples →](/examples)** | Example | Category | | --- | --- | | [Login](/examples/login) | Auth | | [Register](/examples/register) | Auth | | [Dashboard](/examples/dashboard) | Application | | [Landing](/examples/landing) | Marketing | Prefer smaller sections? Start with **[Blocks](/blocks)**. --- Source: https://slate.electrik.dev/docs/accessibility.md --- title: "Accessibility" description: "Accessibility features and best practices in Slate UI Kit" sidebar_order: 1 sidebar_section: "Advanced" --- # Accessibility Slate is built with accessibility in mind. ## WCAG 2.1 AA Compliance All Slate components aim for WCAG 2.1 AA compliance: - ✅ Proper ARIA attributes - ✅ Keyboard navigation - ✅ Screen reader support - ✅ Color contrast ratios ## ARIA Attributes Components include appropriate ARIA attributes: - `aria-label` for icon-only buttons - `aria-expanded` for collapsible components - `aria-describedby` for form inputs - `role` attributes where needed ## Keyboard Navigation All interactive components support keyboard navigation: - Tab to focus - Enter/Space to activate - Escape to close modals (topmost overlay only when nested) - Arrow keys for navigation ## Overlays `dialog`, `sheet`, `drawer`, and `alert-dialog` share: - Focus move into the panel on open, restore to the trigger on close - Tab cycle inside the panel - Escape closes only the **topmost** open overlay - `html.slate-scroll-lock` while any overlay is open (nesting-safe count) - `prefers-reduced-motion` short-circuits overlay transitions ## Reduced motion & RTL - Prefer logical props (`start` / `end`) on sheets, drawers, and toaster placement - Overlay slide directions flip under `[dir="rtl"]` - Buttons, accordion, sidebar, app-shell, and overlays respect `prefers-reduced-motion` / `motion-reduce` ## Screen Readers Components are designed to work with screen readers: - Semantic HTML - Proper heading hierarchy - Descriptive labels - Status announcements ## Color Contrast All color combinations meet WCAG AA standards: - Text on backgrounds - Interactive elements - Focus indicators - Error states ## Best Practices 1. **Use semantic HTML** - Slate components use proper elements 2. **Add labels** - Always label form inputs 3. **Test with screen readers** - Verify accessibility 4. **Keyboard only** - Test without a mouse ## Resources - [WCAG Guidelines](https://www.w3.org/WAI/WCAG21/quickref/) - [ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/) - [WebAIM](https://webaim.org/) --- Source: https://slate.electrik.dev/components/button.md --- title: "Button" description: "Displays a button or a component that looks like a button." sidebar_order: 1 --- # Button Displays a button or a link styled as a button. ## Usage @verbatim Button @endverbatim ## Variants Use the `variant` prop to change the visual style. @verbatim
Default Secondary Outline Ghost Destructive Link
@endverbatim
## Sizes @verbatim
Extra small Small Default Large
@endverbatim
## Icon buttons Use `size="icon-*"` for square icon-only buttons. Put SVG or icon components in the slot. @verbatim @endverbatim ## Links Render as an anchor with `as="a"` and an `href`: @verbatim Go to dashboard @endverbatim ## Loading Use the `loading` prop for a forced busy state (docs, Alpine demos, non-Livewire apps). Pair with `loadingText` for the busy label. ### Forced state @verbatim
Save Save Continue
@endverbatim
### Alpine demo Toggle loading in the browser — works on static exports (no Livewire): @verbatim
Save changes Saving…
@endverbatim
## Livewire loading When you pass `wire:click` / `wire:submit`, the button wires `wire:loading` automatically. Use `loadingText` for the busy label: ```blade Save ``` The control disables for the request and swaps to a spinner + loading text. See [Livewire](/docs/livewire) for more. ## Disabled @verbatim Disabled @endverbatim ## Props | Prop | Type | Default | Description | |------|------|---------|-------------| | `variant` | `default`, `secondary`, `outline`, `ghost`, `destructive`, `link` | `default` | Visual style | | `size` | `xs`, `sm`, `default`, `lg`, `icon`, `icon-xs`, `icon-sm`, `icon-lg` | `default` | Size preset | | `rounded` | `none`, `sm`, `md`, `lg`, `xl`, `full` | `md` | Border radius | | `animation` | `auto`, `none`, `subtle`, `lift` | `auto` | Hover micro-animation | | `loading` | `bool` | `false` | Forced busy state (spinner + disabled) | | `loadingText` | `string` | `null` | Busy label for `loading` or Livewire `wire:loading` | | `as` | `button`, `a` | `button` | HTML element | | `type` | `button`, `submit`, `reset` | `button` | Button type when `as="button"` | --- Source: https://slate.electrik.dev/components/badge.md --- title: "Badge" description: "A small flat label for status, counts, and categories." sidebar_order: 2 --- # Badge A compact, unshadowed label. Use it for status, counts, and inline metadata. ## Usage @verbatim Badge @endverbatim ## Variants @verbatim
Default Secondary Outline Destructive
@endverbatim
## As a link @verbatim New @endverbatim ## Props | Prop | Type | Default | Description | |------|------|---------|-------------| | `variant` | `default`, `secondary`, `outline`, `destructive` | `default` | Visual style | | `as` | `span`, `a` | `span` | HTML element | --- Source: https://slate.electrik.dev/components/card.md --- title: "Card" description: "A flexible container with header, content, and footer sections." sidebar_order: 3 sidebar_section: "Layout" --- # Card Displays a card with header, content, and footer. ## Usage @verbatim Login to your account Enter your email below to login to your account Sign Up Email
Password Forgot your password?
Login Login with Google
@endverbatim
## Composition ``` Card ├── CardHeader │ ├── CardTitle │ ├── CardDescription │ └── CardAction ├── CardContent └── CardFooter ``` ## Size Use `size="sm"` for tighter spacing. @verbatim Scheduled reports Weekly snapshots. No more manual exports.
  • Choose a schedule (daily, or weekly).
  • Send to channels or specific teammates.
  • Include charts, tables, and key metrics.
Set up scheduled reports See what's new
@endverbatim
## Spacing Override `--card-spacing` on the root. Defaults to `1.5rem` (`size="sm"` uses `0.75rem`). @verbatim
16px 20px 24px 32px
16px Tighter inset via CSS variable.

Useful for dense dashboards.

Continue
32px Roomier inset for marketing surfaces.

Matches the largest spacing preset.

Continue
@endverbatim
## Dividers and edge-to-edge content Add `border-b` on the header when you want a top divider. Footer already includes a muted bar and top border. Bleed scrollable content with negative margin. @verbatim Terms of Service Review the terms before accepting the agreement.

These terms govern your use of the workspace, including access to shared documents, project files, and collaboration tools.

You are responsible for the content you upload and for ensuring that your team has the appropriate permissions to view or edit it.

We may update features or limits as the service evolves. When those changes materially affect your workflow, we will notify your workspace administrators.

By continuing, you agree to keep your account credentials secure and to follow your organization's acceptable use policies.

Decline Accept
@endverbatim
## API Reference ### Card | Prop | Type | Default | Description | |------|------|---------|-------------| | `size` | `default` \| `sm` | `default` | Sets `--card-spacing` to `1.5rem` or `0.75rem` | | `as` | `string` | `div` | Root HTML element | ### Parts `card-header`, `card-title`, `card-description`, `card-action`, `card-content`, and `card-footer` all accept `as` and any HTML attributes (`class`, `id`, etc.). Add `border-b` on the header when you want a top divider. Footer already includes a muted bar and top border. Bleed content with negative margin. ## Related - [Button](/components/button) - [Input](/components/input) - [Field](/components/field) - [Badge](/components/badge) --- Source: https://slate.electrik.dev/components/alert.md --- title: "Alert" description: "Displays a callout for user attention." sidebar_order: 4 sidebar_section: "Feedback" --- # Alert Displays a callout for user attention. Use composition parts, or pass `title` / `description` for the progressive prop API. ## Usage @verbatim @endverbatim ## Composition ``` Alert ├── Icon (optional SVG) ├── AlertTitle ├── AlertDescription └── AlertAction ``` Prefer the prop API for typical callouts. Compose manually when you need custom markup: @verbatim New feature available We've added dark mode support. You can enable it in your account settings. @endverbatim ## Destructive Use `variant="destructive"` for error-style callouts. @verbatim @endverbatim ## Status variants Slate also ships `success`, `warning`, and `info` using the semantic theme tokens. @verbatim
@endverbatim
## Action Pass an `action` slot for a button in the top-end corner. @verbatim Enable @endverbatim ## API Reference ### Alert | Prop | Type | Default | Description | |------|------|---------|-------------| | `variant` | `default` \| `destructive` \| `success` \| `warning` \| `info` | `default` | Visual tone | | `title` | `string` | — | Compose `alert-title` automatically | | `description` | `string` | — | Compose `alert-description` automatically | | `as` | `string` | `div` | Root HTML element | Named slot: `action` → wraps content in `alert-action`. ### Parts `alert-title`, `alert-description`, and `alert-action` accept `as` and any HTML attributes. ## Related - [Button](/components/button) - [Badge](/components/badge) - [Card](/components/card) --- Source: https://slate.electrik.dev/components/separator.md --- title: "Separator" description: "Visually or semantically separates content." sidebar_order: 5 sidebar_section: "Layout" --- # Separator Visually or semantically separates content. ## Usage @verbatim

Slate UI

An open-source UI component library.

Blog
Docs
Source
@endverbatim
## Horizontal @verbatim

Account

Manage your profile and preferences.

Billing

Invoices, plans, and payment methods.

@endverbatim
## Vertical Vertical separators need a definite height from the parent. @verbatim
Blog Docs Source
@endverbatim
## Semantic separator Set `decorative="false"` when the divider conveys structure to assistive tech. @verbatim

Section one

Section two

@endverbatim
## API Reference | Prop | Type | Default | Description | |------|------|---------|-------------| | `orientation` | `horizontal` \| `vertical` | `horizontal` | Divider axis | | `decorative` | `bool` | `true` | When `true`, hidden from the accessibility tree | | `as` | `string` | `div` | Root HTML element | ## Related - [Card](/components/card) - [Alert](/components/alert) - [Field](/components/field) --- Source: https://slate.electrik.dev/components/avatar.md --- title: "Avatar" description: "An image element with a fallback for representing a user." sidebar_order: 6 sidebar_section: "Data display" --- # Avatar An image element with a fallback for representing a user. ## Usage @verbatim @endverbatim ## Composition ``` Avatar ├── AvatarImage ├── AvatarFallback └── AvatarBadge (optional status dot or icon) ``` Prefer the prop API for typical avatars. Compose manually when you need custom markup: @verbatim AR @endverbatim ## Status dot Use `dot` for an online-style indicator, or compose `avatar-badge` yourself. @verbatim
@endverbatim
## Badge with icon @verbatim @endverbatim ## Sizes @verbatim
@endverbatim
## Group @verbatim +3 @endverbatim ## API Reference ### Avatar | Prop | Type | Default | Description | |------|------|---------|-------------| | `size` | `default` \| `sm` \| `lg` | `default` | Avatar diameter | | `src` | `string` | — | Image URL (composes `avatar-image`) | | `alt` | `string` | `""` | Image alt text | | `fallback` | `string` | — | Fallback initials when image is missing/broken | | `dot` | `bool` \| `success` \| `warning` \| `destructive` \| `info` \| `primary` \| `muted` | — | Status indicator at the end-bottom corner (`true` = success) | | `as` | `string` | `span` | Root HTML element | ### Parts `avatar-image`, `avatar-fallback`, `avatar-badge`, `avatar-group`, and `avatar-group-count` accept `as` and HTML attributes. ## Related - [Badge](/components/badge) - [Skeleton](/components/skeleton) --- Source: https://slate.electrik.dev/components/skeleton.md --- title: "Skeleton" description: "Use to show a placeholder while content is loading." sidebar_order: 7 sidebar_section: "Feedback" --- # Skeleton Use to show a placeholder while content is loading. ## Usage @verbatim
@endverbatim
## Card placeholder @verbatim
@endverbatim
## API Reference | Prop | Type | Default | Description | |------|------|---------|-------------| | `as` | `string` | `div` | Root HTML element | Size and shape come from `class` (for example `size-10 rounded-full` or `h-4 w-full`). ## Related - [Avatar](/components/avatar) - [Card](/components/card) - [Alert](/components/alert) --- Source: https://slate.electrik.dev/components/dialog.md --- title: "Dialog" description: "A modal dialog that interrupts the user with important content." sidebar_order: 8 sidebar_section: "Overlays" --- # Dialog A modal dialog that interrupts the user with important content and expects a response. Requires Alpine.js. ## Usage @verbatim Edit profile
Name Username
Cancel Save changes
@endverbatim
## Composition ``` Dialog ├── DialogTrigger └── DialogContent ├── DialogHeader │ ├── DialogTitle │ └── DialogDescription ├── …body… └── DialogFooter ``` Prefer `title` / `description` / `footer` on `dialog-content` for typical forms. Compose the parts manually for custom layouts. ## Custom composition @verbatim Share Share link Anyone with the link can view this document. Close Copy @endverbatim ## Without close button @verbatim Confirm Cancel Continue @endverbatim ## API Reference ### Dialog | Prop | Type | Default | Description | |------|------|---------|-------------| | `open` | `bool` | `false` | Initial open state | | `as` | `string` | `div` | Root HTML element | ### DialogContent | Prop | Type | Default | Description | |------|------|---------|-------------| | `showCloseButton` | `bool` | `true` | Corner close control | | `title` | `string` | — | Compose `dialog-title` | | `description` | `string` | — | Compose `dialog-description` | Named slot: `footer` → wraps content in `dialog-footer`. ### Parts `dialog-trigger`, `dialog-close`, `dialog-header`, `dialog-footer`, `dialog-title`, and `dialog-description`. ## Notes - Escape closes the dialog; clicking the overlay also closes it - `dialog-content` teleports to `body` so stacking context stays correct - Consumers need Alpine.js (Livewire includes it) ## Related - [Button](/components/button) - [Alert](/components/alert) - [Field](/components/field) --- Source: https://slate.electrik.dev/components/tabs.md --- title: "Tabs" description: "A set of layered sections of content displayed one at a time." sidebar_order: 9 sidebar_section: "Navigation" --- # Tabs A set of layered sections of content — only one panel is visible at a time. Requires Alpine.js. ## Usage @verbatim Account Password

Make changes to your account here.

Change your password here.

@endverbatim
## Composition ``` Tabs ├── TabsList │ ├── TabsTrigger │ └── TabsTrigger ├── TabsContent └── TabsContent ``` ## Line variant @verbatim Overview Analytics Reports Project overview and recent activity. Traffic and conversion metrics. Downloadable weekly reports. @endverbatim ## Vertical @verbatim General Security Billing Workspace name, timezone, and locale. Password, sessions, and 2FA settings. Plan, invoices, and payment methods. @endverbatim ## API Reference ### Tabs | Prop | Type | Default | Description | |------|------|---------|-------------| | `defaultValue` | `string` | — | Initially selected tab value | | `value` | `string` | — | Alias for initial value | | `orientation` | `horizontal` \| `vertical` | `horizontal` | Layout axis | | `as` | `string` | `div` | Root HTML element | ### TabsList | Prop | Type | Default | Description | |------|------|---------|-------------| | `variant` | `default` \| `line` | `default` | Visual style | ### TabsTrigger / TabsContent | Prop | Type | Default | Description | |------|------|---------|-------------| | `value` | `string` | — | Tab identity (must match between trigger and content) | ## Notes - Consumers need Alpine.js (Livewire includes it) - Active state is tracked with Alpine `active` on the root ## Related - [Button](/components/button) - [Card](/components/card) - [Separator](/components/separator) --- Source: https://slate.electrik.dev/components/spinner.md --- title: "Spinner" description: "A spinning indicator for loading states." sidebar_order: 10 sidebar_section: "Feedback" --- # Spinner A spinning indicator for loading states. ## Usage @verbatim @endverbatim ## Sizes Size with utility classes. @verbatim
@endverbatim
## With button @verbatim
Please wait Loading
@endverbatim
## Colors Inherits `currentColor` from the parent. @verbatim
@endverbatim
## API Reference | Prop | Type | Default | Description | |------|------|---------|-------------| | `label` | `string` | `"Loading"` | Accessible name via `aria-label` | ## Related - [Button](/components/button) - [Skeleton](/components/skeleton) - [Badge](/components/badge) --- Source: https://slate.electrik.dev/components/breadcrumb.md --- title: "Breadcrumb" description: "Displays the path to the current resource using a hierarchy of links." sidebar_order: 11 sidebar_section: "Navigation" --- # Breadcrumb Displays the path to the current resource using a hierarchy of links. ## Usage @verbatim Home Components Breadcrumb @endverbatim ## Composition ``` Breadcrumb └── BreadcrumbList ├── BreadcrumbItem │ └── BreadcrumbLink ├── BreadcrumbSeparator ├── BreadcrumbItem │ └── BreadcrumbLink ├── BreadcrumbSeparator └── BreadcrumbItem └── BreadcrumbPage ``` ## With ellipsis @verbatim Home Components Breadcrumb @endverbatim ## Custom separator Pass children to `breadcrumb-separator` to replace the default chevron. @verbatim Home / Docs @endverbatim ## API Reference ### Parts | Component | Element | Notes | |-----------|---------|-------| | `breadcrumb` | `nav` | Sets `aria-label="breadcrumb"` | | `breadcrumb-list` | `ol` | Flex row of items | | `breadcrumb-item` | `li` | Single crumb | | `breadcrumb-link` | `a` | Navigable crumb (`as` for buttons/custom) | | `breadcrumb-page` | `span` | Current page (`aria-current="page"`) | | `breadcrumb-separator` | `li` | Default chevron flips in RTL | | `breadcrumb-ellipsis` | `span` | Collapsed middle segments | ## Related - [Tabs](/components/tabs) - [Separator](/components/separator) - [Button](/components/button) --- Source: https://slate.electrik.dev/components/progress.md --- title: "Progress" description: "Displays an indicator showing the completion progress of a task." sidebar_order: 12 sidebar_section: "Feedback" --- # Progress Displays an indicator showing the completion progress of a task. ## Usage @verbatim @endverbatim ## Values @verbatim
@endverbatim
## Custom max @verbatim
Uploading 40 / 80 MB
@endverbatim
## API Reference | Prop | Type | Default | Description | |------|------|---------|-------------| | `value` | `number` | `0` | Current progress value | | `max` | `number` | `100` | Maximum value | | `as` | `string` | `div` | Root HTML element | Width is filled from the inline start edge, so it tracks correctly in RTL. ## Related - [Spinner](/components/spinner) - [Skeleton](/components/skeleton) - [Alert](/components/alert) --- Source: https://slate.electrik.dev/components/kbd.md --- title: "Kbd" description: "Displays a keyboard key or shortcut." sidebar_order: 13 --- # Kbd Displays a keyboard key or shortcut. ## Usage @verbatim
Press + K to search
@endverbatim
## Group @verbatim P @endverbatim ## API Reference | Component | Element | Notes | |-----------|---------|-------| | `kbd` | `kbd` | Single key | | `kbd-group` | `kbd` | Groups related keys | ## Related - [Tooltip](/components/tooltip) - [Button](/components/button) --- Source: https://slate.electrik.dev/components/aspect-ratio.md --- title: "Aspect Ratio" description: "Displays content within a desired ratio." sidebar_order: 14 --- # Aspect Ratio Displays content within a desired ratio. ## Usage @verbatim Photo by Drew Beamer @endverbatim ## Ratios @verbatim

1:1

4:3

21:9

@endverbatim
## API Reference | Prop | Type | Default | Description | |------|------|---------|-------------| | `ratio` | `string` | `16 / 9` | CSS aspect-ratio value or preset (`1:1`, `16:9`, `4:3`, `3:2`, `21:9`, `square`, `video`) | | `as` | `string` | `div` | Root HTML element | ## Related - [Card](/components/card) - [Avatar](/components/avatar) --- Source: https://slate.electrik.dev/components/tooltip.md --- title: "Tooltip" description: "A popup that displays information related to an element when hovered or focused." sidebar_order: 15 --- # Tooltip A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it. Requires Alpine.js. ## Usage @verbatim @endverbatim ## Sides Use logical sides: `top`, `bottom`, `start`, `end`. @verbatim
Top End Bottom Start
@endverbatim
## With content slot @verbatim Press K Shortcuts @endverbatim ## Composition ``` Tooltip ├── TooltipTrigger └── TooltipContent ``` @verbatim Hover Composed tooltip @endverbatim ## API Reference ### Tooltip | Prop | Type | Default | Description | |------|------|---------|-------------| | `label` | `string` | — | Progressive tooltip text | | `side` | `top` \| `bottom` \| `start` \| `end` | `top` | Preferred side | | `open` | `bool` | `false` | Initial open state | Named slot: `content` for rich tooltip markup. ## Related - [Button](/components/button) - [Kbd](/components/kbd) - [Dialog](/components/dialog) --- Source: https://slate.electrik.dev/components/collapsible.md --- title: "Collapsible" description: "An interactive component which expands/collapses a panel." sidebar_order: 16 --- # Collapsible An interactive component which expands/collapses a panel. Requires Alpine.js. ## Usage @verbatim

3 starred repositories

Toggle
electrik/slate
electrik/core
laravel/framework
@endverbatim
## Composition ``` Collapsible ├── CollapsibleTrigger └── CollapsibleContent ``` ## Open by default @verbatim Can I use this in my project? Yes. Free for personal and commercial projects. @endverbatim ## API Reference ### Collapsible | Prop | Type | Default | Description | |------|------|---------|-------------| | `open` | `bool` | `false` | Initial open state | | `as` | `string` | `div` | Root HTML element | ### Parts `collapsible-trigger` toggles state; `collapsible-content` shows when open. ## Related - [Dialog](/components/dialog) - [Tabs](/components/tabs) - [Card](/components/card) --- Source: https://slate.electrik.dev/components/accordion.md --- title: "Accordion" description: "A vertically stacked set of interactive headings that each reveal a section of content." sidebar_order: 17 --- # Accordion A vertically stacked set of interactive headings that each reveal a section of content. Requires Alpine.js. ## Usage @verbatim Is it accessible? Yes. It uses ARIA attributes and keyboard-friendly controls. Is it styled? Yes. It comes with default styles that match the rest of Slate. Is it animated? Yes. Open and close transitions are included. @endverbatim ## Multiple Allow more than one item open at once. @verbatim Can I open several items? Yes, with type="multiple". Does collapsible still apply? For multiple, each item toggles independently. @endverbatim ## Composition ``` Accordion ├── AccordionItem │ ├── AccordionTrigger │ └── AccordionContent ``` ## API Reference ### Accordion | Prop | Type | Default | Description | |------|------|---------|-------------| | `type` | `single` \| `multiple` | `single` | One open item, or many | | `default-value` | `string` | — | Initial open value(s); comma-separated for `multiple` | | `collapsible` | `bool` | `true` | Allow closing the open item when `type="single"` | ## Related - [Collapsible](/components/collapsible) - [Tabs](/components/tabs) --- Source: https://slate.electrik.dev/components/popover.md --- title: "Popover" description: "Displays rich content in a portal-like panel anchored to a trigger." sidebar_order: 18 --- # Popover Displays rich content in a panel anchored to a trigger. Click to open, click outside or Escape to close. Requires Alpine.js. ## Usage @verbatim

Dimensions

Set the dimensions for the layer.

Open popover
@endverbatim
## Composition ``` Popover ├── PopoverTrigger └── PopoverContent ``` @verbatim Compose

Place any controls or copy here.

@endverbatim
## API Reference ### Popover | Prop | Type | Default | Description | |------|------|---------|-------------| | `open` | `bool` | `false` | Initial open state | Named slot: `content` for the progressive panel. ### PopoverContent | Prop | Type | Default | Description | |------|------|---------|-------------| | `side` | `top` \| `bottom` \| `start` \| `end` | `bottom` | Preferred side | | `align` | `start` \| `center` \| `end` | `center` | Alignment along the side | ## Related - [Tooltip](/components/tooltip) - [Dialog](/components/dialog) - [Button](/components/button) --- Source: https://slate.electrik.dev/components/toggle.md --- title: "Toggle" description: "A two-state button that can be either on or off." sidebar_order: 19 --- # Toggle A two-state button that can be either on or off. Requires Alpine.js. ## Usage @verbatim @endverbatim ## Outline @verbatim
@endverbatim
## With text @verbatim Italic @endverbatim ## API Reference | Prop | Type | Default | Description | |------|------|---------|-------------| | `pressed` | `bool` | `false` | Initial pressed state | | `variant` | `default` \| `outline` | `default` | Visual style | | `size` | `default` \| `sm` \| `lg` | `default` | Control size | ## Related - [Button](/components/button) - [Switch](/components/switch) - [Badge](/components/badge) --- Source: https://slate.electrik.dev/components/toggle-group.md --- title: "Toggle Group" description: "A set of two-state buttons that can be toggled on or off." sidebar_order: 21 --- # Toggle Group A set of two-state buttons that can be toggled on or off. Requires Alpine.js. ## Usage @verbatim @endverbatim ## Multiple @verbatim B I U @endverbatim ## Composition ``` ToggleGroup └── ToggleGroupItem ``` ## API Reference ### ToggleGroup | Prop | Type | Default | Description | |------|------|---------|-------------| | `type` | `single` \| `multiple` | `single` | Selection mode | | `variant` | `default` \| `outline` | `default` | Visual style for items | | `size` | `default` \| `sm` \| `lg` | `default` | Control size | | `default-value` | `string` | — | Initial value(s); comma-separated for `multiple` | ## Related - [Toggle](/components/toggle) - [Button](/components/button) --- Source: https://slate.electrik.dev/components/empty.md --- title: "Empty" description: "Use to display an empty state when there is no content." sidebar_order: 20 --- # Empty Use to display an empty state when a list, table, or page has no content yet. ## Usage @verbatim Create project Import @endverbatim ## Composition ``` Empty ├── EmptyHeader │ ├── EmptyMedia │ ├── EmptyTitle │ └── EmptyDescription └── EmptyContent ``` @verbatim No results Try a different search or clear filters. Clear filters @endverbatim ## API Reference ### Empty | Prop | Type | Default | Description | |------|------|---------|-------------| | `title` | `string` | — | Progressive title | | `description` | `string` | — | Progressive description | Named slots: `media`, `actions`. ### EmptyMedia | Prop | Type | Default | Description | |------|------|---------|-------------| | `variant` | `icon` \| `default` | `icon` | Icon chip vs plain media | ## Related - [Card](/components/card) - [Button](/components/button) - [Skeleton](/components/skeleton) --- Source: https://slate.electrik.dev/components/slider.md --- title: "Slider" description: "An input where the user selects a value from within a given range." sidebar_order: 22 --- # Slider An input where the user selects a value from within a given range. Requires Alpine.js. ## Usage @verbatim @endverbatim ## Range bounds @verbatim
@endverbatim
## API Reference | Prop | Type | Default | Description | |------|------|---------|-------------| | `value` | `number` | `50` | Initial value | | `min` | `number` | `0` | Minimum | | `max` | `number` | `100` | Maximum | | `step` | `number` | `1` | Step increment | | `name` | `string` | — | Native input name | | `disabled` | `bool` | `false` | Disable interaction | ## Related - [Progress](/components/progress) - [Input](/components/input) - [Field](/components/field) --- Source: https://slate.electrik.dev/components/pagination.md --- title: "Pagination" description: "Pagination with page navigation, next and previous links." sidebar_order: 23 --- # Pagination Pagination with page navigation, next and previous links. ## Usage @verbatim 1 2 3 @endverbatim ## Composition ``` Pagination └── PaginationContent └── PaginationItem ├── PaginationPrevious ├── PaginationLink ├── PaginationEllipsis └── PaginationNext ``` ## API Reference ### PaginationLink | Prop | Type | Default | Description | |------|------|---------|-------------| | `is-active` | `bool` | `false` | Marks the current page | | `size` | `default` \| `icon` \| `sm` | `icon` | Control size | | `href` | `string` | `#` | Link target | ## Related - [Breadcrumb](/components/breadcrumb) - [Button](/components/button) --- Source: https://slate.electrik.dev/components/table.md --- title: "Table" description: "A responsive table component." sidebar_order: 24 --- # Table A responsive table with header, body, footer, and caption parts. ## Usage @verbatim A list of recent invoices. Invoice Status Method Amount INV001 Paid Credit card $250.00 INV002 Pending PayPal $150.00 INV003 Unpaid Bank transfer $350.00 Total $750.00 @endverbatim ## Composition ``` Table ├── TableCaption ├── TableHeader │ └── TableRow / TableHead ├── TableBody │ └── TableRow / TableCell └── TableFooter └── TableRow / TableCell ``` ## Related - [Card](/components/card) - [Checkbox](/components/checkbox) - [Empty](/components/empty) --- Source: https://slate.electrik.dev/components/hover-card.md --- title: "Hover Card" description: "For sighted users to preview content available behind a link." sidebar_order: 25 --- # Hover Card For sighted users to preview content available behind a link. Requires Alpine.js. ## Usage @verbatim

Electrik

Laravel apps, without the boilerplate.

@electrik
@endverbatim
## Composition ``` HoverCard ├── HoverCardTrigger └── HoverCardContent ``` ## Related - [Tooltip](/components/tooltip) - [Popover](/components/popover) - [Avatar](/components/avatar) --- Source: https://slate.electrik.dev/components/alert-dialog.md --- title: "Alert Dialog" description: "A modal dialog that interrupts the user with important content and expects a response." sidebar_order: 26 --- # Alert Dialog A modal dialog that interrupts the user with important content and expects a response. Requires Alpine.js. ## Usage @verbatim Show dialog Cancel Continue @endverbatim ## Composition ``` AlertDialog ├── AlertDialogTrigger └── AlertDialogContent ├── AlertDialogHeader / Title / Description └── AlertDialogFooter ├── AlertDialogCancel └── AlertDialogAction ``` ## Related - [Dialog](/components/dialog) - [Button](/components/button) - [Alert](/components/alert) --- Source: https://slate.electrik.dev/components/sheet.md --- title: "Sheet" description: "Extends the dialog component to display content that complements the main content of the screen." sidebar_order: 27 --- # Sheet Extends the dialog pattern to slide in content from an edge of the screen. Requires Alpine.js. ## Usage @verbatim Open
Save changes
@endverbatim
## Sides Use logical sides: `top`, `bottom`, `start`, `end`. ## Composition ``` Sheet ├── SheetTrigger └── SheetContent ├── SheetHeader / Title / Description ├── SheetClose └── SheetFooter ``` ## Related - [Dialog](/components/dialog) - [Popover](/components/popover) --- Source: https://slate.electrik.dev/components/scroll-area.md --- title: "Scroll Area" description: "Augments native scroll functionality for custom, cross-browser styling." sidebar_order: 28 --- # Scroll Area Augments native scroll functionality with a thin, themed scrollbar. ## Usage @verbatim

Tags

@foreach (range(1, 50) as $i)
Tag {{ $i }}
@if($i < 50) @endif @endforeach
@endverbatim
## Horizontal overflow Give the area a fixed width and let children overflow on the inline axis. @verbatim
@foreach (['Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon', 'Zeta', 'Eta'] as $label) {{ $label }} @endforeach
@endverbatim
## Inside a card Useful for long lists in constrained layouts like sidebars and settings panels. @verbatim Activity @foreach (range(1, 20) as $i)

Event {{ $i }}

@endforeach
@endverbatim
## Related - [Card](/components/card) - [Separator](/components/separator) - [Sidebar](/components/sidebar) --- Source: https://slate.electrik.dev/components/button-group.md --- title: "Button Group" description: "A container that groups related buttons together." sidebar_order: 29 --- # Button Group A container that groups related buttons with connected borders. ## Usage @verbatim Archive Report Snooze @endverbatim ## Vertical @verbatim Top Middle Bottom @endverbatim ## API Reference | Prop | Type | Default | Description | |------|------|---------|-------------| | `orientation` | `horizontal` \| `vertical` | `horizontal` | Layout direction | ## Related - [Button](/components/button) - [Toggle Group](/components/toggle-group) --- Source: https://slate.electrik.dev/components/dropdown-menu.md --- title: "Dropdown Menu" description: "Displays a menu to the user — such as a set of actions or functions — triggered by a button." sidebar_order: 30 --- # Dropdown Menu Displays a menu to the user — such as a set of actions or functions — triggered by a button. Requires Alpine.js. ## Usage @verbatim Open My Account Profile ⇧⌘P Billing ⌘B Settings ⌘S Log out @endverbatim ## Composition ``` DropdownMenu ├── DropdownMenuTrigger └── DropdownMenuContent ├── DropdownMenuLabel ├── DropdownMenuSeparator ├── DropdownMenuItem └── DropdownMenuShortcut ``` ## Related - [Popover](/components/popover) - [Button](/components/button) - [Dialog](/components/dialog) --- Source: https://slate.electrik.dev/components/input.md --- title: "Input" description: "Displays a form input field or a component that looks like an input field." sidebar_order: 2 --- # Input Displays a form input field or a component that looks like an input field. ## Installation The Input component is part of Slate UI Kit and is available by default. ## Usage @verbatim @endverbatim ## Types The Input component supports all standard HTML input types. @verbatim
@endverbatim
## Sizes Use the `size` prop to change the size of the input. @verbatim
@endverbatim
## With Label Use the `label` prop to add a label to the input. @verbatim
@endverbatim
## With Help Text Use the `description` prop (or `help` alias) for supporting copy. @verbatim @endverbatim ## Error State Use the `errorMessage` prop to show an error message. @verbatim @endverbatim ## Disabled State Disable an input by adding the `disabled` attribute. @verbatim
@endverbatim
## Livewire Integration The Input component automatically detects Livewire and shows loading/error states. @verbatim @endverbatim ## API Reference ### Props | Prop | Type | Default | Description | |------|------|---------|-------------| | `type` | `string` | `"text"` | The HTML input type. Options: `text`, `email`, `password`, `number`, `tel`, `url`, etc. | | `size` | `string` | `"default"` | The size of the input. Options: `sm`, `default`, `lg` | | `disabled` | `boolean` | `false` | Disable the input | | `readonly` | `boolean` | `false` | Make the input readonly | | `required` | `boolean` | `false` | Make the input required | | `autofocus` | `boolean` | `false` | Autofocus the input | | `placeholder` | `string` | `null` | Placeholder text | | `value` | `string` | `null` | Input value | | `name` | `string` | `null` | Input name attribute | | `id` | `string` | `null` | Input ID attribute | | `label` | `string` | `null` | Label text | | `help` | `string` | `null` | Help text below input | | `errorMessage` | `string` | `null` | Error message to display | ### Sizes - **sm** - Small input (height: 36px) - **default** - Default input (height: 40px) - **lg** - Large input (height: 44px) ## Accessibility The Input component includes: - Proper label association - ARIA attributes for error states - Keyboard navigation support - Focus visible states - Disabled state handling ## Related Components - [Button](/components/button) - Button component - [Field](/components/field) - Form field wrapper with label helpers --- Source: https://slate.electrik.dev/components/textarea.md --- title: "Textarea" description: "A multiline text input with the same density and validation semantics as input." sidebar_order: 3 --- # Textarea A styled native `