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.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- currentSnaprequiredRef<TSheetSnapId>
- The currently-active snap id.
- dragOffsetrequiredRef<number>
- Live drag delta during a gesture (px from snap baseline).
- isDraggingrequiredRef<boolean>
- True while a pointer is held on the handle.
- snapTorequired(id: TSheetSnapId) => void
- Imperative snap — programmatically move the sheet to a named snap point.
- dismissrequired() => void
- Convenience alias for snapTo("closed").
- currentSnapHeightrequiredRef<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