Sheet
A panel that slides in from a screen edge, sharing the dialog focus-trap patterns.
Preview
Navigation
Browse the sections of your account from here.
Controls
Device view renders in an isolated frame so real responsive breakpoints apply. Switch to Full for overflowing popovers.
Installation
php artisan ui:add sheet
Behavior layer (Alpine)
This component installs a self-registering Alpine module to
resources/js/ui/sheet.js. Import the behavior layer once
from your bundle so it loads (it hooks alpine:init):
import './sheet.js';
Registry contract
Install confidence
php artisan ui:add sheet
writes only the generated targets below. The CLI validates each file hash before writing and
prompts before replacing local changes unless --force is used.
- Version
- 1.1.0
- License
- open
- Stability
- stable
- Contract
- v2
- Foundation
- ≥ 1.0.0
| Type | Generated target |
|---|---|
| blade | resources/views/components/ui/sheet.blade.php |
| blade | resources/views/components/ui/sheet/trigger.blade.php |
| blade | resources/views/components/ui/sheet/content.blade.php |
| blade | resources/views/components/ui/sheet/header.blade.php |
| blade | resources/views/components/ui/sheet/title.blade.php |
| blade | resources/views/components/ui/sheet/description.blade.php |
| blade | resources/views/components/ui/sheet/footer.blade.php |
| blade | resources/views/components/ui/sheet/close.blade.php |
| js | resources/js/ui/sheet.js |
Registry dependencies
None.
Package dependencies
composer: jml/brok:^1.0
npm: alpinejs
Guidance
Focused overlayHandle a short focused interruption or blocking decision.
Use when
- Use for short, self-contained work that benefits from preserving page context, or for interruptions that truly deserve focused attention. Do not use for long forms, multi-step tasks, or broad comparison work that needs more room and less interruption.
- Showing supplementary controls, navigation, or details without replacing the page.
- An edge-aligned panel should preserve context behind it.
Avoid when
- Prefer over a dialog when users need more room for a supporting task while preserving page context.
- The task requires a centered, strongly modal decision; use dialog.
- A small non-modal panel is sufficient; use popover.
- Task length
- short
- Interaction cost
- high
- Interruptiveness
- high
- Input precision
- none
- Mobile / touch risk
- high
- Accessibility risk
- high
- Needs background context
- Yes
- Comparison needed
- No
Preferred alternatives
- Inline content
- Drawer or dedicated page for longer tasks
Anti-patterns
- Long forms in dialogs
- Multi-step or comparison-heavy modal workflows
Anatomy
root
trigger
overlay
content
header
title
description
footer
close
Theming hooks
sheet overlay
sheet content
Canonical examples
defaultsidesnavigationwith-form
API
manifest knowledge + registry-derived coverageProps
| Prop | Type / values | Default | Description |
|---|---|---|---|
| side | top|end|bottom|start | end | Logical edge from which the panel enters. |
Slots
default— Primary Blade slot rendered by the component.x-ui.sheet.trigger— Installed subcomponent from the registry item.x-ui.sheet.content— Installed subcomponent from the registry item.x-ui.sheet.header— Installed subcomponent from the registry item.x-ui.sheet.title— Installed subcomponent from the registry item.x-ui.sheet.description— Installed subcomponent from the registry item.x-ui.sheet.footer— Installed subcomponent from the registry item.x-ui.sheet.close— Installed subcomponent from the registry item.
Data slots
sheet
sheet-close
sheet-content
sheet-description
sheet-footer
sheet-header
sheet-overlay
sheet-portal
sheet-title
sheet-trigger
Capabilities
Behavior
- Traps focus, closes on Escape, restores focus, and mirrors start/end placement in RTL.
- Installs a JavaScript behavior module when the registry item includes resources/js/ui files.
- Declares registry capability flags: a11y, interactive, responsive, rtl, darkMode, localized.
Usage
<x-ui.sheet>
<x-ui.sheet.trigger class="inline-flex h-10 items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background">
{{ __('Open menu') }}
</x-ui.sheet.trigger>
<x-ui.sheet.content side="end">
<x-ui.sheet.close />
<x-ui.sheet.header>
<x-ui.sheet.title>{{ __('Navigation') }}</x-ui.sheet.title>
<x-ui.sheet.description>{{ __('Browse the sections of your account from here.') }}</x-ui.sheet.description>
</x-ui.sheet.header>
<nav class="mt-6 flex flex-col gap-1 text-sm">
<a href="#" class="rounded-md px-3 py-2 text-foreground transition-colors hover:bg-muted">{{ __('Dashboard') }}</a>
<a href="#" class="rounded-md px-3 py-2 text-foreground transition-colors hover:bg-muted">{{ __('Settings') }}</a>
<a href="#" class="rounded-md px-3 py-2 text-foreground transition-colors hover:bg-muted">{{ __('Billing') }}</a>
</nav>
<x-ui.sheet.footer>
<button type="button" @click="hide()" class="inline-flex h-10 items-center justify-center rounded-md border border-border bg-background px-4 text-sm font-medium text-foreground transition-colors hover:bg-muted">
{{ __('Close') }}
</button>
</x-ui.sheet.footer>
</x-ui.sheet.content>
</x-ui.sheet>
Accessibility & localization
data-slot
Keyboard focus-visible
Localized labels
- Provide a title even when it is visually hidden.
- Use logical start/end sides for RTL-safe placement.
- Uses semantic HTML and a stable
data-slotattribute for styling/scripting hooks. - Focus-visible rings use the
ringtoken so keyboard focus is always visible. - Disabled and invalid states are conveyed to assistive tech, not by color alone.
- Targets WCAG 2.2 AA; verify contrast in light, dark, admin and customer surfaces above.
- Labels go through
__()and the component uses logical properties (ms-*,text-start,start-*) so it mirrors correctly — flip the preview to RTL to confirm.
Source
The exact, editable file ui:add writes
into your app — copy it or own the whole thing. Previews
render this same code; there are no preview-only components.
Changelog
Current version: v1.1.0. See the site changelog for the full release history.