Skip to content
Back

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-sheet
9:41
The code is part of Oxyn Pro

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.

Get Pro

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.

Terminal
oxyn add bottom-sheet

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Peek

Rests at 45 %.

9:41
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Full

Opens at full height.

9:41
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Three detents

30 / 60 / 92 %.

9:41
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

BottomSheet

PropTypeDefaultDescription
titlerequiredString—Title.
descriptionOption<String>Default::default()Quiet line.
openboolDefault::default()Start open.
trigger_labelOption<String>Default::default()A button that opens it.
detentsVec<f32>vec![0.45, 0.92]Resting heights as fractions of the viewport (`[0.45, 0.92]`).
initial_detentusizeDefault::default()Index into the sorted detents it opens at.
close_labelString"Close"Close button label.
containedboolDefault::default()Inside the nearest positioned ancestor (detents use its height).
childrenElementDefault::default()Body.
on_open_changeEventHandler<bool>—Open state changed.
on_detent_changeEventHandler<usize>—Settled on a different detent.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
↑or↓On the grabber: one detent up / down
HomeorEndTallest / smallest
EnterorSpaceToggle smallest and tallest
↓orPage DownOn the sheet: expand first
EscClose

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
TransitionDurationEasingReduced motion
Open360 msease.out120 ms fade
Settle on a detent380 mscubic-bezier(.32,.72,0,1)instant
Dismiss220 msease.outinstant

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 BottomSheet from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: BottomSheetEl in oxyn_gpui.
  • Props to set first: title.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI