Picker

Overlay & Surface
stable

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

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

Anatomy of OrigamPickerSchematic of the Picker component with 5 numbered zones. origam-picker__title — "Choose date" origam-picker__header slot origam-picker__body (#default slot) origam-picker__actions slot 1 2 3 4 5
Anatomy of <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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

landscape
boolean
false
Switches the picker to a horizontal 2-column layout: title on the left, body on the right.
hideHeader
boolean
false
Hides the header slot even when it has content.
side
TDirectionBoth
swipeable
boolean
snapPoints
ReadonlyArray<TSheetSnapPoint>
defaultSnap
TSheetSnapId
open
boolean
disabled
boolean
persistent
boolean
handleLabel
string
tag
string
'div'
HTML tag rendered at the root of the PickerTitle.
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 color applied to the title strip.
bgColor
Background color of the title strip.
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
true
Applies a border to the picker panel.
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 of the picker panel. Default from token: {radius.md}.
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. Default from token: {shadow.lg}.
height
number | string
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
Width of the picker panel. Min-width defaults to 320px from token.
location
TAnchor
position
TPosition
top
number | string
bottom
number | string
left
number | string
right
number | string
active
boolean | IStateEffectConfig
activeClass
string
hover
boolean | IStateEffectConfig
hoverClass
string
title
string
Title text rendered inside the PickerTitle strip.
fontSize
TFontSize
fontWeight
TFontWeight
letterSpacing
TLetterSpacing

API

Slots

Emplacements de contenu exposés par ce composant.

#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.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

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

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Rôles ARIA

dialog

Interactions clavier

Interactions clavier
ToucheAction
EscapeCloses the picker when used inside an overlay (DatePickerField, ColorPickerField).
TabMoves 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.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

Source
color
var(--origam-color__surface---raised)
Panel background.
dimension
var(--origam-radius---md)
Panel border-radius.
shadow
var(--origam-shadow---lg)
Panel drop shadow.
dimension
320px
Minimum panel width.
color
currentColor
Title strip text color.
duration
var(--origam-motion__duration---medium)
Transition duration for the picker panel enter/leave.

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Custom picker shell

vue

Landscape orientation

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.