Sheet
General-purpose surface container with optional swipe-to-expand bottom-sheet gesture. Used as the base layer for Dialog, Picker, ColorPickerField and other overlay components.
Preview
Rendering the live preview…
defaultRendering the live preview…
coloredRendering the live preview…
outlinedRendering the live preview…
elevatedStructure
Anatomy
Visual breakdown of the component's internal structure with BEM class call-outs.
<origam-sheet> — 3 parts: root surface ①, drag handle (when swipeable) ②, and default slot content ③.- 1.origam-sheet
- Root element. Polymorphic (tag prop). Carries all BEM modifiers and CSS variable overrides from tokens.
- 2.origam-sheet__handle / .origam-sheet__handle-pill
- Drag handle rendered only when swipeable=true and side="bottom". Has role="button" and tabindex="0" for keyboard accessibility.
- 3#default slot
- Main content area. Rendered below the handle when swipeable.
API
Props
All props accepted by this component, with their type, default value and description.
- sideTDirectionBoth
- Edge the sheet is anchored to. Only 'bottom' activates the swipe gesture today. Other values reserve the prop for future side-sheet patterns.
- swipeablebooleanfalse
- Enables the mobile-style swipe-to-expand / swipe-to-dismiss gesture. Effective only when side='bottom'.
- snapPointsReadonlyArray<TSheetSnapPoint>closed/peek(120px)/half(50vh)/full(90vh)
- Discrete heights the sheet settles on after a drag. Each entry is { id, height } where height is a number (px) or CSS length string.
- defaultSnapTSheetSnapId'half'
- Initial snap id when the sheet mounts. One of 'closed', 'peek', 'half', 'full' or a custom id.
- openboolean
- v-model:open — false maps to the 'closed' snap, true restores the last non-closed snap.
- disabledbooleanfalse
- Disables the swipe gesture. The sheet stays at defaultSnap.
- persistentbooleanfalse
- Prevents swipe-dismiss below the 'closed' snap. A fast downward flick snaps to the next non-zero point instead.
- handleLabelstring
- tagstring'div'
- Root HTML element.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- color
- Text/foreground color of the sheet surface.
- bgColor
- Background color override for the sheet surface.
- borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>false
- Applies border tokens to the sheet surface.
- borderTopboolean | number | string
- borderLeftboolean | number | string
- borderBottomboolean | number | string
- borderRightboolean | number | string
- borderBlockboolean | number | string
- borderInlineboolean | number | string
- borderInlineStartboolean | number | string
- borderInlineEndboolean | number | string
- borderBlockStartboolean | number | string
- borderBlockEndboolean | number | string
- borderColorstring
- borderStylestring
- borderTopColorTColor
- borderRightColorTColor
- borderBottomColorTColor
- borderLeftColorTColor
- borderInlineStartColorTColor
- borderInlineEndColorTColor
- borderBlockStartColorTColor
- borderBlockEndColorTColor
- Border-radius applied to the sheet. When swipeable=true the sheet token defaults to 2xl on the top corners.
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | number | string
- elevationTElevation
- Box-shadow elevation token applied to the surface.
- heightnumber | string
- Height override. Used by the swipe composable to set the live snap height via --origam-sheet---swipe-height.
- maxHeightnumber | string
- maxWidthnumber | string
- minHeightnumber | string
- minWidthnumber | string
- widthnumber | string
- Width override.
- locationTAnchor
- positionTPosition
- topnumber | string
- bottomnumber | string
- leftnumber | string
- rightnumber | string
- activeboolean | IStateEffectConfigfalse
- Forces the active visual state.
- activeClassstring
- hoverboolean | IStateEffectConfig
- hoverClassstring
API
Slots
Content slots exposed by this component.
- #default
- Main sheet content. Rendered after the drag handle (when swipeable=true).
API
Emits
Events emitted by this component.
- @update:snapTSheetSnapId
- Emitted whenever the gesture or snapTo() settles on a new snap-point id ('closed', 'peek', 'half', 'full' or custom).
- @update:openboolean
- Emitted on the closed/non-closed boundary to keep v-model:open consistent when the user dismisses via swipe.
- @update:activeany
- @update:hoverboolean
API
Exposed members
Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.
- <T extends object>(props: T, exclude?: string[]) => Partial<T>
- Utility to forward a filtered subset of props to child components.
- (id: TSheetSnapId) => void
- Imperatively snap the sheet to a given snap-point id.
- Ref<TSheetSnapId>
- Reactive current snap-point id.
- Ref<boolean>
- True while the user is dragging the sheet handle.
- Ref<string>
- Reactive CSS string generated by useStyle.
- string
- Unique style-sheet ID for this instance.
- () => void
- Injects the computed style sheet. Called automatically on mount.
- () => void
- Removes the injected style sheet. Called automatically on unmount.
- Ref<boolean>
- True once the style sheet has been injected.
Customisation
CSS variables
CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.
- Surface background color.
- Surface foreground color.
- Box-shadow elevation. Overridden by elevation prop.
- Live height driven by the swipe gesture composable. Updated on every pointer-move frame during a drag.
- Width of the drag handle pill.
- Height of the drag handle pill.
- Background color of the drag handle pill.
- Border-radius applied to top corners when swipeable=true.
Inclusion
Accessibility
ARIA roles, keyboard navigation and focus management. Sourced from the real component template.
Keyboard interactions
| Key | Action |
|---|---|
| Tab (handle) | Focuses the drag handle button when swipeable=true. |
| Enter / Space (handle) | Cycles through snap points when the handle is focused. |
Notes
- The drag handle has role="button", tabindex="0" and aria-label="Drag handle" so keyboard users can navigate snap points without touch.
- Under prefers-reduced-motion, the height transition is disabled. Height still changes imperatively but without animation.
- OrigamSheet is a surface-only primitive. Overlay focus-trap and aria-modal semantics are managed by the Dialog or Drawer wrapper using this component.
Foundation
Design tokens
Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.
- colorvar(--origam-color__surface---default)
- Surface background color.
- colorvar(--origam-color__text---primary)
- Surface text color.
- dimension32px
- Handle pill width.
- dimension4px
- Handle pill height.
- colorvar(--origam-color__border---subtle)
- Handle pill color.
- dimensionvar(--origam-radius---2xl)
- Top-corner border-radius in swipeable mode.
- dimension120px
- Default peek snap-point height.
- dimension50vh
- Default half-expanded snap-point height.
Interactive
Playground
Edit props live and see the component update in real time. The generated code snippet updates as you change values.
Rendering the live preview…
Usage
Examples
Ready-to-paste code snippets for your templates.
Basic surface
Bottom sheet (swipeable)
Custom snap points