CardHeader

Surface
stable

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

Aperçu

Rendu de l’aperçu en cours…

title only

Rendu de l’aperçu en cours…

with subtitle

Rendu de l’aperçu en cours…

with prepend icon

Rendu de l’aperçu en cours…

with append icon

Structure

Anatomie

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

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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et 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

Emplacements de contenu exposés par ce composant.

#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

Événements émis par ce composant.

@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

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

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

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.

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

Accessibilité

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

Interactions clavier

Interactions clavier
ToucheAction
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.

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.

Basic card header

vue

With prepend icon and append action

vue

With avatar

vue

Écosystème

Famille

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