ExpansionPanels

Layout & Structure
stable

Container managing a group of ExpansionPanel items. Supports accordion, flat, popout and inset display modes. Props cascade to all child panels via DefaultsProvider.

Structure

Anatomy

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

Anatomy of OrigamExpansionPanelsSchematic of the ExpansionPanels container with 3 numbered internal parts. .origam-expansion-panels origam-expansion-panel ① (slot item 0) origam-expansion-panel ② (slot item 1) 1 2
Anatomy of <origam-expansion-panels>. The root ① is a flex container wrapping all child panels ②. Mode modifiers (accordion, flat, popout, inset) are applied as root class modifiers.
1.origam-expansion-panels
Root flex container. Wraps all panels. Mode modifier classes (--accordion, --flat, --popout, --inset) control layout and border-radius of children.
2.origam-expansion-panel (child)
Each OrigamExpansionPanel child. Border-radius is managed by the parent's CSS selectors (:first-child, :last-child) for mode-specific shapes.

API

Props

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

flat
boolean
false
Removes the shadow and the border separator between panels.
items
Array<IExpansionPanelProps>
Data-driven array of panel definitions. Each item is spread as props onto an OrigamExpansionPanel instance.
accordion
boolean
false
Collapses all other panels when one is opened (single-open mode). Panels are rendered without gaps and border-radius is managed per position.
popout
boolean
false
Active panel expands horizontally beyond the container width, creating a popout effect.
inset
boolean
false
Active panel shrinks horizontally to sit inside the container, creating an inset effect.
expandIcon
'mdi-chevron-down'
Icon passed down to every child panel header for the collapsed state.
collapseIcon
'mdi-chevron-up'
Icon passed down to every child panel header for the expanded state.
hideActions
boolean
false
Passed down to every child panel header to hide the expand/collapse icon.
color
Foreground colour cascaded to all child panels.
bgColor
Background colour cascaded to all child panels.
tag
string
'div'
HTML element rendered at the panels container root.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
disabled
boolean
modelValue
any
Active panel value(s). Bound to v-model. Array for multiple, single value for one.
multiple
boolean
false
Allows multiple panels to be expanded simultaneously.
mandatory
boolean
false
At least one panel must remain open. "force" prevents deselection even if the same item is clicked.
max
number
selectedClass
string
density
'default'
Cascaded density to all child panels: compact, comfortable or default.
Border-radius of the container and cascaded to all child panels.
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>
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
eager
boolean
false
When true, all panel content is rendered on mount even if collapsed.
loading
false
Shows a progress loader on the panels container.
loadingText
string
elevation
TElevation
Box-shadow elevation of the panels container.
active
boolean | IStateEffectConfig
activeClass
string
hover
boolean | IStateEffectConfig
hoverClass
string

API

Slots

Content slots exposed by this component.

#default
Default slot for manual <origam-expansion-panel> children. Used when items prop is not provided.
#item
Overrides the default panel rendering for all data-driven items.
#item.{index}
Overrides the rendering of a specific panel at the given index.
#header
Replaces the header inside all data-driven panels.
#prepend
Leading slot for all data-driven panel headers.
#title
Title slot for all data-driven panel headers.
#append
Trailing slot for all data-driven panel headers.
#wrapper
Replaces the content wrapper for all data-driven panels.
#content
Body content slot for all data-driven panels.

API

Emits

Events emitted by this component.

@update:modelValue
any
Fired when the active panel selection changes. Carries the new value or array of values.

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

Width of inactive panels in popout mode.
Width of the active panel in popout mode.
Width of inactive panels in inset mode.
Width of the active panel in inset mode.
Transition duration for the header overlay border-radius animation in accordion mode.

Inclusion

Accessibility

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

Keyboard interactions

Keyboard interactions
KeyAction
TabMoves focus between panel headers in sequence.

Notes

  • The container manages group selection state and propagates it to child panels via inject/provide. Each panel header receives aria-expanded and aria-controls independently.
  • Visual props (density, color, bgColor, rounded, border) are cascaded via OrigamDefaultsProvider so all child panels share the same visual treatment without per-panel repetition.

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
calc(100% - 32px)
Inactive panel width in popout mode.
dimension
calc(100% + 16px)
Active panel width in popout mode.
dimension
calc(100% - 32px)
Active panel width in inset mode.
duration
var(--origam-motion__duration---slow)
Transition duration for border-radius animation in accordion header overlay.

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 group

vue

Accordion (single open)

vue

Data-driven via items prop

vue

Ecosystem

Family

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