Bottom sheet

A React component in Beamline's Overlays category, in the free sample.

A phone panel that rests at a peek and follows the finger to full height; a flick down closes it, and the handle works from the keyboard.

Use it for

  • Phone panels that rest at a peek and expand: filters, details, a picker.

Not for

Anatomy

  • scrim
  • panel
  • handle (button)
  • title
  • description
  • close
  • body (scrolls)

Variants

  • detents: fractions of the screen height, default [0.45, 0.92]

States

  • closed
  • entering
  • resting at a detent
  • dragging
  • leaving (focus already back, taps pass through)

Keyboard

  • Escape closes
  • Closing returns focus to what opened it at once, before the panel has left
  • Enter on the handle cycles heights
  • ↑ ↓ on the handle move between heights (↓ at the lowest closes)
  • Tab is trapped inside
  • Opening autofocus preserves initialDetent. Focusing a control below the resting visible area expands the panel, independent of the entrance animation.

Motion

Slides on the host-resolved --pui-ease-drawer over --pui-duration-considered (360 ms at foundation scale one); follows scoped speed and reduced/none. While dragged it follows the finger 1:1 and resists past the top. Escape, Close, the scrim or a flick slide it away; focus returns, the trap lets go and taps reach the page as the slide starts, not when it ends. When its owner closes it (`open` false, e.g. after a pick) it goes at once. While held the handle answers at once (wider and brighter) and lets go over the departure.

Props

PropTypeDefaultDescription
titlestring—Heading shown above the content. Required.
detentsnumber[][0.45, 0.92]Resting heights as fractions of the screen, lowest first. Default [0.45, 0.92].
initialDetentnumber0Which resting height it opens at. Default 0.
onDetentChange(index) => void—Reports sheet resting height after a change; no callback by default.
triggerReactNode—An element that opens it (uncontrolled use).
open / defaultOpen / onOpenChangeboolean—open: Controlled open state; omit to use defaultOpen. defaultOpen: Initial open state when uncontrolled. Defaults to false. onOpenChange: Reports open state after a change; no callback by default.
classNamestyped part classes—Classes for the named visual parts; no part overrides by default.
styleCSSProperties—Inline styles on the documented visual root; no inline overrides by default.
refHTMLDivElement—Receives the documented root element; no ref by default.
openboolean—Controlled open state; omit to use defaultOpen.
defaultOpenboolean—Initial open state when uncontrolled. Defaults to false.
onOpenChange((open: boolean) => void)—Reports open state after a change; no callback by default.
descriptionstring—Supporting text beneath the label or heading. Defaults to no supporting text.
closeLabelstring—Accessible text for the close control. Defaults to "Close".
classNamestring—Classes on the documented visual root; no override by default.
childrenReactNode—Content rendered inside the component. Defaults to no children.

Built from

Used in

Dependencies

@radix-ui/react-dialog, motion, lucide-react

Import

import { BottomSheet } from "@beamline/bottom-sheet";

Get it

Bottom sheet is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Bottom sheet is included in the free MIT sample. Get Beamline · Connect your agent

More in Overlays

  • Command menu: Search-first list of every action: ranked matching, groups, keycap shortcuts and nested pages; inline as CommandPalette or in a ⌘K dialog as CommandMenu.
  • Toast: Short results of an action stacked at an edge: point at the stack to fan it out and pause the timers; undo or retry in place; Alt+T, Escape and a swipe…
  • Share dialog: Share a document, board or project: invite people by name or email with the access they get, change or remove anyone's access in place, and set who the…
  • Context menu: Actions for an object on right-click, long-press, Shift+F10 or the menu key, opened at the pointer, with the same rows as the dropdown menu.
  • Hover card: A preview of a person, link or record on hover or keyboard focus, without leaving the page; HoverCardProfile is the standard person preview.
  • Product tour: A short guided tour over the real interface: a spotlight that glides from one element to the next while the rest of the screen dims, and a card beside…
  • Sheet: A panel that slides in from an edge with the page still visible behind it: header and footer stay put while the body scrolls.
  • Dropdown menu: A list of actions behind a trigger, with shortcuts, check items, headings and submenus; one highlight glides under the pointer and jumps with the keyboard.
  • Dialog: A focused task over the page (create, invite, rename) with a title, body and footer; focus moves in, is trapped and returns on close.
  • Alert Dialog: A blocking confirmation that must be answered: the scrim does not dismiss it, focus starts on the safe choice, and an async action keeps it open until…
  • Popover: A small surface anchored to a trigger for a short form, a filter or an explanation; focus moves in and returns on close.
  • Tooltip: Short supporting text for a control: opens after a moment on hover and at once on keyboard focus; inside a toolbar group the next one opens instantly.

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.