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
Anatomy
Visual breakdown of the component's internal structure with BEM class call-outs.
<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
All props accepted by this component, with their type, default value and 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
Content slots exposed by this component.
- #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
Events emitted by this component.
- @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
Exposed members
Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.
- (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.
Customisation
CSS variables
CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.
- Header background colour.
- Header text colour.
- Header font size (content area).
- Minimum height of the header container.
Inclusion
Accessibility
ARIA roles, keyboard navigation and focus management. Sourced from the real component template.
Keyboard interactions
| Key | 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.
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.
- dimension32px
- Header font size.
- dimension70px
- Header minimum 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.
Date header with transition
Ecosystem
Family
Components from the same folder that share conventions and often compose together.