Pickers & inputs
JS behaviour
Bottom sheet
A draggable sheet on a native dialog with snap points; it rubber-bands past the top, a quick downward flick dismisses it, and so do Escape and the backdrop.
Real scenarios
The component as it is used in a product — not a specimen grid.
Where to?
Azadi Square → Tajrish
Running shoes · 214 items
Focus the handle and use ↑/↓ to move between heights; Escape or the backdrop closes it.
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| snaps | array | [0.5, 0.9] | Snap points as fractions of the viewport height. |
| id + nx-open-sheet | event | — | Open it with $dispatch('nx-open-sheet', 'id') from anywhere, or bind open with wire:model. |
| initial / dismissible | int · bool | 0 · true | The opening snap; whether drag, Escape and the backdrop may close it. |
Snippet
<x-nx::button x-data x-on:click="$dispatch('nx-open-sheet', 'filters')">Filters</x-nx::button>
<x-nx::bottom-sheet id="filters" title="Filters" :snaps="[0.4, 0.9]">…</x-nx::bottom-sheet>