Lynx/Modules/Bottom Sheet/API reference
@sigx/lynx-sheet · Beta · Component library

API reference#

Exports of @sigx/lynx-sheet v0.20.0.

Exports#

ExportKindPurpose
BottomSheetcomponentThe route-free bottom sheet.
BackdropcomponentThe dimmed, tap-to-dismiss backdrop behind the sheet.
DetentSpectypeA rest position: { fraction }, { px }, or a keyboard detent.
useSheetEnginehookSheet state + snap logic for a custom surface.
createSheetPanfunctionThe pan-gesture handler for a sheet.
resolveDetentsfunctionResolve DetentSpec[] to concrete px against the current viewport.
decideDragOwnerfunctionInner-scroll arbitration — decides whether a drag moves the sheet or scrolls the body.
useSheetHeighthookThe sheet's current reveal height as a shared value, for content that reacts to it.
TSX
import { BottomSheet, Backdrop } from '@sigx/lynx-sheet';
import type { DetentSpec } from '@sigx/lynx-sheet';

<BottomSheet> props#

PropTypeNotes
detentsDetentSpec[]The rest positions, ascending. Tracked live — changing them re-snaps the open sheet. Default [{ fraction: 0.5 }].
initialDetentIndexnumberIndex into detents to open at. Default: the most-open detent.
maxHeightnumberUpper bound on the sheet height, also tracked live.
dragMode'handle' | 'surface' | 'grabber'What owns the drag gesture.
openbooleanControlled open state (dismissible mode).
onClose() => voidFired when a dismissible sheet closes.

DetentSpec#

A rest position is one of:

  • { fraction: number } — a fraction of the screen height (01).
  • { px: number } — a fixed pixel height.
  • a keyboard detent — tracks the soft keyboard so the sheet rides it.

@sigx/lynx-sheet is new in 0.19. This page covers the public surface most apps use; the deep engine signatures live in the package's typed source.