ExpansionPanelHeader

Layout & Structure
stable

Clickable header button with expand/collapse icon, prepend/append slots and ripple support. Carries aria-expanded and aria-controls.

Structure

Anatomy

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

Anatomy of OrigamExpansionPanelHeaderSchematic of the ExpansionPanelHeader component with 5 numbered internal parts. .origam-expansion-panel-header (button) __overlay __prepend __title (__wrapper) __append 1 2 3 4 5
Anatomy of <origam-expansion-panel-header> — 5 internal parts. Root ① is rendered as a <button> with aria-expanded and aria-controls. The overlay ② covers the entire button for hover/focus state painting.
1.origam-expansion-panel-header
Root button element. Carries aria-expanded, aria-controls, tabindex and the ripple directive.
2.origam-expansion-panel-header__overlay
Absolutely positioned overlay for hover/focus state painting. Opacity is 0 at rest, increases on hover and focus-visible.
3.origam-expansion-panel-header__prepend
Leading area hosting prependAvatar or prependIcon. Emits click:prepend when clicked.
4.origam-expansion-panel-header__title
Title text span. Hosts the default slot or the title prop value.
5.origam-expansion-panel-header__append
Trailing area hosting appendAvatar, appendIcon, and the expand/collapse icon. Emits click:append when clicked.

API

Props

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

expandIcon
'mdi-chevron-down'
Icon displayed in the append area when the panel is collapsed.
collapseIcon
'mdi-chevron-up'
Icon displayed in the append area when the panel is expanded.
hideActions
boolean
false
Hides the expand/collapse icon in the append area.
focusable
boolean
true
When true, the header button is focusable and shows an overlay on focus.
static
boolean
false
Renders the header in static mode — clicking does not toggle the panel. The static class modifier is applied.
readonly
boolean
false
Prevents click interactions without disabling the button visually. The panel state cannot be toggled.
title
string
Header title text rendered in the middle area. Can be replaced by the default slot.
color
Foreground colour applied to the header text and icons.
bgColor
Background colour of the header button surface.
tag
string
'button'
HTML element rendered at the header root. Defaults to button for accessibility.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
density
'default'
Header density: compact, comfortable or default.
Border-radius applied to the header button. Inherits from the parent panel by default.
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
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
none
Border shorthand applied to the header. Defaults to none.
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
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
appendAvatar
string
Image URL for an avatar shown in the trailing area.
appendIcon
MDI icon shown in the trailing (append) area after the expand/collapse icon.
prependAvatar
string
Image URL for an avatar shown in the leading area before the title.
prependIcon
MDI icon shown in the leading (prepend) area before the title.
prependAriaLabel
string
appendAriaLabel
string
ripple
boolean | { class: string }
true
Material ripple effect on the header click. Set to false to disable.
active
boolean | IStateEffectConfig
activeClass
string
hover
boolean | IStateEffectConfig
hoverClass
string
fontSize
TFontSize
lineHeight
TLineHeight

API

Slots

Content slots exposed by this component.

#prepend
Leading area before the title. Defaults to prependAvatar / prependIcon.
#title
#default
Replaces the title text. Receives the current expand/collapse state and icon props.
#append
Trailing area after the title. Defaults to appendAvatar / appendIcon followed by the expand/collapse icon.

API

Emits

Events emitted by this component.

@click:append
MouseEvent
Fired when the append area (icon or avatar) is clicked.
@click:prepend
MouseEvent
Fired when the prepend area (icon or avatar) is clicked.

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>
Filters and forwards a subset of props to sub-components.
Ref<string>
Reactive CSS string generated by useStyle.
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.

Customisation

CSS variables

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

Font size of the header title text (15px).
Font weight of the header title text.
Line height of the header button.
Minimum height of the header at rest.
Border-radius inherited from the parent panel.
Top and bottom padding of the inner wrapper row.
Leading and trailing padding of the inner wrapper row.
Base opacity of the state overlay. Increases to ~0.04 on hover and ~0.12 on focus-visible.
Overlay opacity when the header is focused (focus-visible).

Inclusion

Accessibility

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

ARIA roles

button

Keyboard interactions

Keyboard interactions
KeyAction
Enter / SpaceToggles the parent panel expanded/collapsed when focus is on the header button.
TabMoves focus to the next interactive element.

Notes

  • The header button carries aria-expanded="true|false" reflecting the current panel selection state.
  • The header button carries aria-controls pointing to the content region ID (expansion-panel-content-{id}).
  • Disabled panels apply tabindex="-1" and the disabled HTML attribute to the header button. Pointer events are removed.
  • When readonly is true, clicks are intercepted but not propagated — the button remains focusable and receives keyboard events without toggling.
  • The ripple directive provides a visual affordance for click interactions that supplements focus-visible styling.

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.

Source
dimension
0.9375rem
Header title font size (15px).
dimension
48px
Header minimum height at rest.
dimension
64px
Header minimum height when panel is expanded.
dimension
var(--origam-space---4)
Top and bottom padding of the wrapper row (16px).
dimension
var(--origam-space---6)
Leading and trailing padding of the wrapper row (24px).
number
var(--origam-opacity---0)
Base overlay opacity on hover (resolved via scoped style to 0.04).

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

This is an internal sub-part: it is injected by its parent component and cannot render on its own. See the parent component page for a live example.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Basic header with title

vue

Prepend icon

vue

Custom expand / collapse icons

vue

Ecosystem

Family

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