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
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<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.
- 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
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
Interactions clavier
| Touche | 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.
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.
- 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.
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
Landscape orientation
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.