ISheetSwipeReturn

interface
Composable Return

Public surface returned by useSheetSwipe(). Exposes reactive state (currentSnap, dragOffset, isDragging, currentSnapHeight) and imperative controls (snapTo, dismiss) to drive the bottom-sheet from outside the composable.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

currentSnap
required
Ref<TSheetSnapId>
The currently-active snap id.
dragOffset
required
Ref<number>
Live drag delta during a gesture (px from snap baseline).
isDragging
required
Ref<boolean>
True while a pointer is held on the handle.
snapTo
required
(id: TSheetSnapId) => void
Imperative snap — programmatically move the sheet to a named snap point.
dismiss
required
() => void
Convenience alias for snapTo("closed").
currentSnapHeight
required
Ref<number>
Resolved height (in px) of the active snap point. Useful for layout maths and test assertions.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Programmatic sheet control via useSheetSwipe

typescript