Components

Sheet

Extends the dialog to display content that complements the main content of the screen.

php artisan blatui:add sheet
<x-ui.sheet>
    <x-ui.sheet-trigger>
        <x-ui.button variant="outline">Open</x-ui.button>
    </x-ui.sheet-trigger>
    <x-ui.sheet-content side="right">
        <x-ui.sheet-header>
            <x-ui.sheet-title>Edit profile</x-ui.sheet-title>
            <x-ui.sheet-description>
                Make changes to your profile here. Click save when you're done.
            </x-ui.sheet-description>
        </x-ui.sheet-header>
        <div class="grid flex-1 auto-rows-min gap-6 px-4">
            <div class="grid gap-2">
                <x-ui.label for="sheet-name">Name</x-ui.label>
                <x-ui.input id="sheet-name" value="Pedro Duarte" />
            </div>
            <div class="grid gap-2">
                <x-ui.label for="sheet-username">Username</x-ui.label>
                <x-ui.input id="sheet-username" value="@peduarte" />
            </div>
        </div>
        <x-ui.sheet-footer>
            <x-ui.button type="submit">Save changes</x-ui.button>
            <x-ui.button variant="outline" class="w-full" x-on:click="open = false">Close</x-ui.button>
        </x-ui.sheet-footer>
    </x-ui.sheet-content>
</x-ui.sheet>

Menu

<x-ui.sheet>
    <x-ui.sheet-trigger>
        <x-ui.button variant="outline" size="icon" aria-label="Open menu"><x-lucide-panel-left aria-hidden="true" /></x-ui.button>
    </x-ui.sheet-trigger>
    <x-ui.sheet-content side="left">
        <x-ui.sheet-header>
            <x-ui.sheet-title>Menu</x-ui.sheet-title>
            <x-ui.sheet-description>Navigate your workspace.</x-ui.sheet-description>
        </x-ui.sheet-header>
        <nav class="grid gap-1 px-4">
            <a href="#" class="hover:bg-accent flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium"><x-lucide-house class="size-4" aria-hidden="true" /> Home</a>
            <a href="#" class="hover:bg-accent flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium"><x-lucide-inbox class="size-4" aria-hidden="true" /> Inbox</a>
            <a href="#" class="hover:bg-accent flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium"><x-lucide-calendar class="size-4" aria-hidden="true" /> Calendar</a>
            <a href="#" class="hover:bg-accent flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium"><x-lucide-settings class="size-4" aria-hidden="true" /> Settings</a>
        </nav>
    </x-ui.sheet-content>
</x-ui.sheet>

Scroll

<x-ui.sheet>
    <x-ui.sheet-trigger>
        <x-ui.button variant="outline">Release notes</x-ui.button>
    </x-ui.sheet-trigger>
    <x-ui.sheet-content side="right">
        <x-ui.sheet-header>
            <x-ui.sheet-title>Release notes</x-ui.sheet-title>
            <x-ui.sheet-description>Everything new in this version.</x-ui.sheet-description>
        </x-ui.sheet-header>
        <div class="text-muted-foreground flex flex-1 flex-col gap-3 overflow-y-auto px-4 text-sm">
            <p>We rebuilt the component engine for faster first paint and smaller bundles.</p>
            <p>Every overlay now traps focus and restores it to the trigger on close.</p>
            <p>The theme customizer gained six new base colors and an export button.</p>
            <p>Tables support row selection, sticky headers, and inline row actions.</p>
            <p>Forms compose accessible fields with descriptions and error messages.</p>
            <p>Charts ship with thirty ready-made variations across six chart types.</p>
        </div>
        <x-ui.sheet-footer>
            <x-ui.button x-on:click="open = false">Got it</x-ui.button>
        </x-ui.sheet-footer>
    </x-ui.sheet-content>
</x-ui.sheet>

Sides

<div class="grid grid-cols-2 gap-2">
    @foreach (['top', 'right', 'bottom', 'left'] as $side)
        <x-ui.sheet>
            <x-ui.sheet-trigger>
                <x-ui.button variant="outline" class="w-full capitalize">{{ $side }}</x-ui.button>
            </x-ui.sheet-trigger>
            <x-ui.sheet-content :side="$side">
                <x-ui.sheet-header>
                    <x-ui.sheet-title>Edit profile</x-ui.sheet-title>
                    <x-ui.sheet-description>
                        Make changes to your profile here. Click save when you're done.
                    </x-ui.sheet-description>
                </x-ui.sheet-header>
                <x-ui.sheet-footer>
                    <x-ui.button type="submit">Save changes</x-ui.button>
                </x-ui.sheet-footer>
            </x-ui.sheet-content>
        </x-ui.sheet>
    @endforeach
</div>

API Reference

Props, slots and exposed methods for <x-ui.sheet>.

Props

Prop Type Default Description
open bool false Initial open state of the sheet on first render.
id string — Enables "dispatchable" mode: the sheet also opens/closes from anywhere via $dispatch('open-sheet-{id}') / $dispatch('close-sheet-{id}'). Use <x-ui.sheet-trigger for="{id}"> from inside a loop or partial.
wire:model bool — Since 1.38. Set on <x-ui.sheet>. Binds the open state to a Livewire boolean property, both ways: `$this->open = true` opens it from the server, and closing it (Escape, the overlay, a close button) sets the property back to false. Opening it from the browser with `$wire.open = true` sends no request at all. Deferred like any wire:model; .live sends every change.
side string 'right' Set on <x-ui.sheet-content>. Which edge of the viewport the panel slides in from.
right left top bottom
showClose bool true Set on <x-ui.sheet-content>. Render the built-in top-right close (X) button.
closeOnOverlay bool true Since 1.21. Set on <x-ui.sheet-content>. Clicking the backdrop closes the sheet. Pass false for a "static backdrop" — a form a stray click should not discard. Escape and the close button are unaffected.
for string — Set on <x-ui.sheet-trigger>. Opens a dispatchable sheet defined elsewhere (matching its id) instead of one in the same scope.

Slots

Slot Description
default Holds the <x-ui.sheet-trigger> and <x-ui.sheet-content>. The root only manages open state.
trigger The clickable element that opens the sheet, wrapped in <x-ui.sheet-trigger>.
content The sliding panel (<x-ui.sheet-content>), teleported to <body>. Compose it from <x-ui.sheet-header> (with <x-ui.sheet-title> + <x-ui.sheet-description>), your body, and <x-ui.sheet-footer>. Dismisses on overlay click, Escape, or the close button.

Events

Events the component listens for (in) and dispatches (out). Both directions bubble, so .window works even when the component is teleported.

Event Direction Detail
sheet-closed Out Since 1.38. Dispatched from the <x-ui.sheet> root once it has finished closing and is off screen, whatever closed it. The place to reset a form: on open = false the fade-out is still playing, and a reset that lands then empties the fields in front of the user. Listen with x-on:sheet-closed or wire:sheet-closed="resetForm" on the root; it bubbles, so add .self when sheets are nested.