Sheet

Overlay & Surface
stable

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…

default

Rendering the live preview…

colored

Rendering the live preview…

outlined

Rendering the live preview…

elevated

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamSheetSchematic of the Sheet component with 3 numbered parts. #default slot 1 2 3
Anatomy of <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.

side
TDirectionBoth
Edge the sheet is anchored to. Only 'bottom' activates the swipe gesture today. Other values reserve the prop for future side-sheet patterns.
swipeable
boolean
false
Enables the mobile-style swipe-to-expand / swipe-to-dismiss gesture. Effective only when side='bottom'.
snapPoints
ReadonlyArray<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.
defaultSnap
TSheetSnapId
'half'
Initial snap id when the sheet mounts. One of 'closed', 'peek', 'half', 'full' or a custom id.
open
boolean
v-model:open — false maps to the 'closed' snap, true restores the last non-closed snap.
disabled
boolean
false
Disables the swipe gesture. The sheet stays at defaultSnap.
persistent
boolean
false
Prevents swipe-dismiss below the 'closed' snap. A fast downward flick snaps to the next non-zero point instead.
handleLabel
string
tag
string
'div'
Root HTML element.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
color
Text/foreground color of the sheet surface.
bgColor
Background color override for the sheet surface.
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
false
Applies border tokens to the sheet surface.
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderColor
string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
Border-radius applied to the sheet. When swipeable=true the sheet token defaults to 2xl on the top corners.
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
elevation
TElevation
Box-shadow elevation token applied to the surface.
height
number | string
Height override. Used by the swipe composable to set the live snap height via --origam-sheet---swipe-height.
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
Width override.
location
TAnchor
position
TPosition
top
number | string
bottom
number | string
left
number | string
right
number | string
active
boolean | IStateEffectConfig
false
Forces the active visual state.
activeClass
string
hover
boolean | IStateEffectConfig
hoverClass
string

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:snap
TSheetSnapId
Emitted whenever the gesture or snapTo() settles on a new snap-point id ('closed', 'peek', 'half', 'full' or custom).
@update:open
boolean
Emitted on the closed/non-closed boundary to keep v-model:open consistent when the user dismisses via swipe.
@update:active
any
@update:hover
boolean

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

Keyboard interactions
KeyAction
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.

Source
color
var(--origam-color__surface---default)
Surface background color.
color
var(--origam-color__text---primary)
Surface text color.
dimension
32px
Handle pill width.
dimension
4px
Handle pill height.
color
var(--origam-color__border---subtle)
Handle pill color.
dimension
var(--origam-radius---2xl)
Top-corner border-radius in swipeable mode.
dimension
120px
Default peek snap-point height.
dimension
50vh
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

vue

Bottom sheet (swipeable)

vue

Custom snap points

vue