Picker
Base picker chrome shared by DatePicker and ColorPicker. Provides a card panel with title, optional header, body slot, and actions footer. Supports landscape orientation and full token customisation.
Structure
Anatomy
Visual breakdown of the component's internal structure with BEM class call-outs.
<origam-picker> — 5 zones: title strip (PickerTitle), optional header slot, body (#default slot), actions footer, and the root sheet container.- 1.origam-picker__title
- OrigamPickerTitle strip at the top. Hosts the #title slot or the title prop text. Themed via color and bgColor.
- 2.origam-picker__header
- Optional header zone between the title and the body. Only rendered when the #header slot has content.
- 3.origam-picker__body
- Main body area. Hosts the #default slot content (calendar grid, color wheel, etc.).
- 4.origam-picker__actions
- Footer zone for action buttons (Cancel / OK). Only rendered when the #actions slot has content.
- 5.origam-picker
- Root OrigamSheet panel. Applies border, rounded, elevation, min-width and width from props and tokens.
API
Props
All props accepted by this component, with their type, default value and description.
- landscapebooleanfalse
- Switches the picker to a horizontal 2-column layout: title on the left, body on the right.
- hideHeaderbooleanfalse
- Hides the header slot even when it has content.
- sideTDirectionBoth
- swipeableboolean
- snapPointsReadonlyArray<TSheetSnapPoint>
- defaultSnapTSheetSnapId
- openboolean
- disabledboolean
- persistentboolean
- handleLabelstring
- tagstring'div'
- HTML tag rendered at the root of the PickerTitle.
- 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 color applied to the title strip.
- bgColor
- Background color of the title strip.
- borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>true
- Applies a border to the picker panel.
- 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 of the picker panel. Default from token: {radius.md}.
- 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. Default from token: {shadow.lg}.
- heightnumber | string
- maxHeightnumber | string
- maxWidthnumber | string
- minHeightnumber | string
- minWidthnumber | string
- widthnumber | string
- Width of the picker panel. Min-width defaults to 320px from token.
- locationTAnchor
- positionTPosition
- topnumber | string
- bottomnumber | string
- leftnumber | string
- rightnumber | string
- activeboolean | IStateEffectConfig
- activeClassstring
- hoverboolean | IStateEffectConfig
- hoverClassstring
- titlestring
- Title text rendered inside the PickerTitle strip.
- fontSizeTFontSize
- fontWeightTFontWeight
- letterSpacingTLetterSpacing
API
Slots
Content slots exposed by this component.
- #title
- Content rendered inside the PickerTitle strip. Overrides the title prop.
- #header
- Optional zone between the title and the body. DatePicker uses it for navigation arrows.
- #default
- Main body content of the picker. DatePicker injects the calendar grid here; ColorPicker injects the color wheel.
- #actions
- Footer actions zone (Cancel / OK buttons). Only rendered when the slot has content.
Customisation
CSS variables
CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.
- Picker panel background color.
- Picker panel text color.
- Border-radius of the panel.
- Drop shadow of the panel.
- Minimum width to prevent the panel from collapsing.
- Top and bottom padding inside the panel.
- Left and right padding inside the panel.
- Title strip text color.
- Title strip font size.
Inclusion
Accessibility
ARIA roles, keyboard navigation and focus management. Sourced from the real component template.
ARIA roles
Keyboard interactions
| Key | Action |
|---|---|
| Escape | Closes the picker when used inside an overlay (DatePickerField, ColorPickerField). |
| Tab | Moves focus through the picker controls in order. |
Notes
- When used standalone, OrigamPicker has no implicit ARIA role. When opened inside a Dialog or Overlay, it inherits role="dialog" from the container.
- The title prop / #title slot provides a visible label. The parent overlay should reference it via aria-labelledby for screen reader context.
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---raised)
- Panel background.
- dimensionvar(--origam-radius---md)
- Panel border-radius.
- shadowvar(--origam-shadow---lg)
- Panel drop shadow.
- dimension320px
- Minimum panel width.
- colorcurrentColor
- Title strip text color.
- durationvar(--origam-motion__duration---medium)
- Transition duration for the picker panel enter/leave.
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.
Custom picker shell
Landscape orientation
Ecosystem
Family
Components from the same folder that share conventions and often compose together.