DatePickerHeader
Header banner of the DatePicker displaying the currently selected date value with animated transitions. Supports prepend/append slots and emits a click event for interactive headers.
Structure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<origam-date-picker-header> — root grid ①, prepend area ②, animated content ③, append area ④.- 1.origam-date-picker-header
- Root div with grid-template-areas: "prepend content append".
- 2.origam-date-picker-header__prepend
- Prepend grid area.
- 3.origam-date-picker-header__content
- Animated content area (wrapped in OrigamTransition).
- 4.origam-date-picker-header__append
- Append grid area.
API
Props
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.
- headerstring
- Text content displayed in the header. Transitions animate between value changes.
- transition
- Transition applied to the header content when the header value changes.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- color
- Text colour of the header.
- appendAvatarstring
- Image URL for an avatar in the append area.
- appendIcon
- MDI icon rendered in the append slot when no slot override is provided.
- prependAvatarstring
- Image URL for an avatar in the prepend area.
- prependIcon
- MDI icon rendered in the prepend slot when no slot override is provided.
- prependAriaLabelstring
- appendAriaLabelstring
- density
- Density modifier forwarded to prepend/append icons and avatars.
API
Slots
Emplacements de contenu exposés par ce composant.
- #default
- Header content. Falls back to the header prop value.
- #prepend
- Custom prepend content. When absent, renders prependAvatar or prependIcon.
- #append
- Custom append content. When absent, renders appendAvatar or appendIcon.
API
Emits
Événements émis par ce composant.
- @clickMouseEvent
- Fired when the header container is clicked (used to switch picker mode).
- @click:prependMouseEvent
- Fired when the prepend area is clicked.
- @click:appendMouseEvent
- Fired when the append area is clicked.
API
Membres exposés
Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.
- (props: IDatePickerHeaderProps, exclude?: string[]) => Partial<IDatePickerHeaderProps>
- Filters component props for forwarding.
- ComputedRef<string>
- Serialised scoped CSS string.
- string
- Unique style scope identifier.
- () => void
- Mounts the scoped style sheet.
- () => void
- Unmounts the scoped style sheet.
- Ref<boolean>
- Whether the scoped style sheet is currently mounted.
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.
- Header background colour.
- Header text colour.
- Header font size (content area).
- Minimum height of the header container.
Inclusion
Accessibilité
Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.
Interactions clavier
| Touche | Action |
|---|---|
| Enter / Space | Activates the header click when it is keyboard-focusable. |
Notes
- OrigamTransition wraps the content; reduced-motion is respected by the transition component.
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.
- dimension32px
- Header font size.
- dimension70px
- Header minimum height.
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.
Date header with transition
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.