Bottom sheetPro
A sheet that rests at a peek or full height and follows your finger: rubber-bands past the top, projects a flick to the nearest detent, and the backdrop dims with its height.
oxyn add bottom-sheetFilter runs
12 of 214 runs match
The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Filters, share targets and quick actions on a phone: a sheet that rests at a peek height and can be pulled to full height or flicked away with one thumb.
When not to use
- The dialog docked to an edge for inspectors and run details: use Sheet instead.
- Nested sheets with depth: use Sheet stack instead.
- A dense card that gives itself more room on request: use Expandable card instead.
Installation
Bottom sheet is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add bottom-sheetUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Peek
Rests at 45 %.
Filter runs
12 of 214 runs match
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Full
Opens at full height.
Filter runs
12 of 214 runs match
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Three detents
30 / 60 / 92 %.
Filter runs
12 of 214 runs match
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
BottomSheet
| Prop | Type | Default | Description |
|---|---|---|---|
titlerequired | String | — | Title. |
description | Option<String> | Default::default() | Quiet line. |
open | bool | Default::default() | Start open. |
trigger_label | Option<String> | Default::default() | A button that opens it. |
detents | Vec<f32> | vec![0.45, 0.92] | Resting heights as fractions of the viewport (`[0.45, 0.92]`). |
initial_detent | usize | Default::default() | Index into the sorted detents it opens at. |
close_label | String | "Close" | Close button label. |
contained | bool | Default::default() | Inside the nearest positioned ancestor (detents use its height). |
children | Element | Default::default() | Body. |
on_open_change | EventHandler<bool> | — | Open state changed. |
on_detent_change | EventHandler<usize> | — | Settled on a different detent. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| ↑or↓ | On the grabber: one detent up / down |
| HomeorEnd | Tallest / smallest |
| EnterorSpace | Toggle smallest and tallest |
| ↓orPage Down | On the sheet: expand first |
| Esc | Close |
Accessibility
- role=dialog with aria-modal; the grabber is a button with aria-expanded and an Expand / Collapse label.
- Detent changes are announced politely ("Sheet at 45 percent").
From the spec
A modal dialog named by its title. The grabber is a real button: ↑ ↓ step detents, Home / End jump, Enter / Space toggles; ↓ or Page Down on the sheet expands first. Each settle is announced ("Sheet at 45 percent").
Motion & interaction
The sheet follows the finger with no lag; past the tallest detent the pull resists (rubber band, 0.55 coefficient). On release the height springs to the projected detent. The backdrop dim tracks the live height, so it fades as the sheet is dragged away.
Timing
| Transition | Duration | Easing | Reduced motion |
|---|---|---|---|
| Open | 360 ms | ease.out | 120 ms fade |
| Settle on a detent | 380 ms | cubic-bezier(.32,.72,0,1) | instant |
| Dismiss | 220 ms | ease.out | instant |
Responsive behaviour
- min(100 %, 36 rem) wide; detents are fractions of the container or viewport height.
Edge cases (spec)
Detents are fractions of the container (or viewport) height and are sorted. A fast flick down from the smallest detent dismisses. Content scrolls inside the sheet; dragging starts from the grabber or header so scrolling still works.
Notes for AI
- Import
BottomSheetfromoxyn_dioxusand includePRIMITIVES_CSSplus the token stylesheet once. - A GPUI version exists:
BottomSheetElinoxyn_gpui. - Props to set first:
title. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.