CardHeader

Surface
stable

Card header section rendering title, subtitle and optional prepend/append icon or avatar in a 3-column grid layout.

Preview

Rendering the live preview…

title only

Rendering the live preview…

with subtitle

Rendering the live preview…

with prepend icon

Rendering the live preview…

with append icon

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamCardHeaderSchematic of the CardHeader component with 6 numbered internal parts. prepend Title Subtitle append 1 2 3 4 5 6
Anatomy of <origam-card-header> — root grid ① (3-column: prepend / content / append), underlay ② (absolute), prepend ③, content area ④, title ⑤, subtitle ⑥.
1.origam-card-header
Root element (renders as OrigamToolbar). 3-column grid: max-content 1fr auto. Overrides toolbar box-shadow and background to be transparent/none to match the card surface.
2.origam-card-header__underlay
Absolute positioned underlay span. Reserved for interaction overlays (position: absolute, inset: 0).
3.origam-card-header__prepend
Prepend column host (grid-area: prepend). Display: flex, align-items: center. Renders prependAvatar, prependIcon or #prepend slot.
4.origam-card-header__content
Content column host (grid-area: content). overflow: hidden. Contains title, subtitle and the #default slot.
5.origam-card-header__title
Title text block. font-size: 1rem, font-weight: 400, white-space: nowrap, overflow: hidden, text-overflow: ellipsis.
6.origam-card-header__subtitle
Subtitle text block. opacity: 0.6, font-size: 0.875rem. Line-clamped via -webkit-box-orient: vertical.

API

Props

All props accepted by this component, with their type, default value and description.

subtitle
string | number
Secondary text rendered below the title. Slightly smaller and at reduced opacity (0.6). Can be overridden with the #subtitle slot.
title
string | number
Primary heading text rendered in the content area. Can also be overridden with the #title slot.
titleId
string
tag
string
'OrigamToolbar'
Root element tag. Defaults to OrigamToolbar so it picks up toolbar-level layout; overrides box-shadow and background to integrate into the card surface.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
false
Applies a border to the header element. Sets border-width: thin when true.
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 for the header element.
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
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
density
'default'
Density modifier that adjusts padding block and inline values via --origam-card-header---density.
appendAvatar
string
Image URL for an OrigamAvatar rendered in the append slot.
appendIcon
MDI icon displayed in the append column (grid-area: append).
prependAvatar
string
Image URL for an OrigamAvatar rendered in the prepend slot.
prependIcon
MDI icon displayed in the prepend column (grid-area: prepend).
prependAriaLabel
string
appendAriaLabel
string
fontSize
TFontSize
fontWeight
TFontWeight
lineHeight
TLineHeight
letterSpacing
TLetterSpacing

API

Slots

Content slots exposed by this component.

#wrapper
Full override of the header inner layout (prepend + content + append). When provided, all other slots and prop-driven rendering are bypassed.
#title
Override the title content. Receives the title prop value.
#subtitle
Override the subtitle content. Receives the subtitle prop value.
#default
Extra content rendered inside .origam-card-header__content after the title and subtitle.
#prepend
Replaces the prepend column content. Rendered inside .origam-card-header__prepend.
#append
Replaces the append column content. Rendered inside .origam-card-header__append.

API

Emits

Events emitted by this component.

@click:append
MouseEvent
Fired when the user clicks the append slot area.
@click:prepend
MouseEvent
Fired when the user clicks the prepend slot area.

API

Exposed members

Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to child components.
Ref<string>
Reactive CSS string generated by useStyle from the computed cardHeaderStyles.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet into the document.
() => void
Removes the injected style sheet.
Ref<boolean>
True once the style sheet has been injected into the DOM.

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

Minimum height of the header. Adjusted with density offset.
Block-start padding (density-adjusted at render time).
Block-end padding (density-adjusted).
Inline-start padding (density-adjusted).
Inline-end padding (density-adjusted).
Density offset added to padding values. compact: −8px, default: 0px, comfortable: +8px.
Grid layout areas: prepend / content / append.
Grid columns: prepend (shrink-to-content) / content (fill) / append (auto).
Title font size (1rem = 16px).
Subtitle font size (0.875rem = 14px).
Subtitle opacity (reduced to create visual hierarchy).
Opacity applied to icons in the prepend/append areas.

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

Keyboard interactions

Keyboard interactions
KeyAction
TabMoves focus to interactive elements inside the header (prepend/append clicks).

Notes

  • The title prop is rendered as plain text in a <div>. If the card header serves as a section heading, wrap the title slot content in the appropriate heading element (<h2>, <h3>, etc.) for correct document outline.
  • When appendIcon is an action (e.g. a menu trigger), add aria-label via the #append slot or on the wrapping element to describe the action to screen reader users.

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.

Basic card header

vue

With prepend icon and append action

vue

With avatar

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.