Skip to content

OrigamExpansionPanel ​

<OrigamExpansionPanel> is a single collapsible panel — a header row that toggles a content region below it. It must be used as a child of OrigamExpansionPanels, which registers the accordion/group context every panel needs (selection state, multiple, mandatory, max).

Runtime requirement — OrigamExpansionPanel calls useGroupItem against the group injected by OrigamExpansionPanels (packages/ds/src/components/ExpansionPanel/OrigamExpansionPanel.vue, ORIGAM_EXPANSION_PANEL_KEY). Rendering it outside an OrigamExpansionPanels ancestor throws [Origam] Could not find useGroup injection with symbol … at runtime — this isn't an optional wrapper, it's required.

Basic usage ​

vue
<template>
    <origam-expansion-panels>
        <origam-expansion-panel title="Panel one" content="First panel body." />
        <origam-expansion-panel title="Panel two" content="Second panel body." />
    </origam-expansion-panels>
</template>

Header — title, prepend/append icons ​

title and content are shorthand props; for full control override the header entirely or just the pieces you need. expandIcon / collapseIcon (default: chevron-down / chevron-up) swap the trailing indicator, and hideActions removes it. Every header prop and slot documented on OrigamExpansionPanelHeader is available directly on OrigamExpansionPanel (its props interface extends the header's).

vue
<template>
    <origam-expansion-panels>
        <origam-expansion-panel
            title="With icons"
            content="Panel body."
            prepend-icon="mdi-folder"
            append-icon="mdi-star"
        />
    </origam-expansion-panels>
</template>
vue
<template>
    <origam-expansion-panels>
        <origam-expansion-panel content="Panel body.">
            <template #title>
                <strong>Custom title</strong>
            </template>
        </origam-expansion-panel>
    </origam-expansion-panels>
</template>

Content ​

content accepts a string or a component; for rich/slotted markup use the default slot instead — every prop and slot documented on OrigamExpansionPanelContent is likewise forwarded from OrigamExpansionPanel (its props interface extends the content's).

vue
<template>
    <origam-expansion-panels>
        <origam-expansion-panel title="Rich content">
            <p>This content was inserted via the default slot.</p>
            <p>It supports arbitrary markup.</p>
        </origam-expansion-panel>
    </origam-expansion-panels>
</template>

By default the content is lazy: it doesn't mount until the panel is opened for the first time, and unmounts again after the closing transition ends (useLazy). Pass eager to keep it mounted (and hidden) at all times.

Loading state ​

loading accepts a boolean, a 0–100 progress number, or an explicit { type: 'line' | 'circular' | 'skeleton', … } config, rendered above the header (line / circular) or as three skeleton lines inside the content (skeleton, one announcement for the three lines; the panel itself renders no loader element for this kind) — same contract as every other ILoaderProps component in the design system.

vue
<template>
    <origam-expansion-panels>
        <origam-expansion-panel :loading="true" title="Loading…" content="…" />
        <origam-expansion-panel :loading="42" title="42 % loaded" content="…" />
        <origam-expansion-panel :loading="{ type: 'skeleton' }" title="Skeleton" content="…" />
    </origam-expansion-panels>
</template>

loadingText names what that indicator announces to a screen reader. It carries a locale key, not final text: the panel and its content hand it to the active renderer's label prop (<OrigamProgress> / <OrigamSkeleton>), which resolves it through the DS t() mechanism. Defaults to the shared 'origam.loading' key; a raw string matching no key is returned unchanged. Set on the parent <origam-expansion-panels> it cascades to every panel as a default, exactly like density / color below — a panel's own loading-text still wins. A per-instance loading="{ type, label }" wins over both.

vue
<template>
    <origam-expansion-panels loading-text="origam.data_iterator.loading_text">
        <origam-expansion-panel :loading="true" title="Announces the group's text" content="…" />
        <origam-expansion-panel :loading="true" loading-text="my.own.key" title="Announces its own" content="…" />
    </origam-expansion-panels>
</template>

Disabled / readonly ​

disabled (or the parent's disabled) blocks interaction entirely and dims the header. readonly keeps the panel visually interactive but prevents the click handler from toggling it open/closed.

vue
<template>
    <origam-expansion-panels>
        <origam-expansion-panel disabled title="Cannot open" content="…" />
        <origam-expansion-panel readonly title="Cannot toggle by click" content="…" />
    </origam-expansion-panels>
</template>

Hover / active ​

hover and active follow the shared three-shape grammar (undefined = reactive to pointer/click, true = forced on, or an object overriding color / bgColor / border / rounded / elevation / padding / margin while the state is engaged) — see IHoverProps / IActiveProps.

Density / color / shape ​

density (TDensity), color / bgColor (TColor), elevation (TElevation), rounded (+ per-corner variants), border (+ per-side variants and borderColor / borderStyle) and padding / margin (+ per-side variants) follow the standard cross-cutting composables. When set on the parent OrigamExpansionPanels, density, color, bgColor, rounded, border — plus the behavioural eager and loadingText — cascade to every panel as defaults; a panel's own prop still wins. The container itself owns no content and paints no loading indicator, so those last two only mean anything one level down.

vue
<template>
    <origam-expansion-panels density="compact" color="primary">
        <origam-expansion-panel title="Inherits compact + primary" content="…" />
        <origam-expansion-panel title="Overrides bg-color" bg-color="danger" content="…" />
    </origam-expansion-panels>
</template>

Props ​

PropTypeDefaultDescription
tagstring'div'Root HTML element
titlestring—Header title text (also available as the #title slot)
contentstring | Component—Content body (also available as the default slot)
expandIconTIconMDI_ICONS.CHEVRON_DOWN ('mdi:mdi-chevron-down')Trailing icon shown when collapsed
collapseIconTIconMDI_ICONS.CHEVRON_UP ('mdi:mdi-chevron-up')Trailing icon shown when expanded
hideActionsbooleanfalseHides the trailing expand/collapse icon
prependIcon / prependAvatarTIcon / string—Leading icon / avatar in the header
appendIcon / appendAvatarTIcon / string—Trailing icon / avatar in the header (before the expand indicator)
focusablebooleanfalseKeeps the focus-visible overlay styling engaged while active
staticbooleanfalsePrevents the header's min-height from growing when active
readonlybooleanfalseDisables the open/close click handler without dimming the panel
disabledbooleanfalseDisables the panel entirely (via the group item context)
valueany—Selection value registered with the parent group (IGroupItemProps)
eagerbooleanfalseKeeps the content mounted even while collapsed. Cascades from the parent OrigamExpansionPanels as a default
loadingboolean | number | TLoaderConfig—Loading state — see Loading state
loadingTextstring'origam.loading' (renderer default)Locale key announced by the loading indicator — forwarded to <OrigamProgress> / <OrigamSkeleton>'s label. Cascades from the parent OrigamExpansionPanels as a default. See Loading state
selectedClassstring—Declared on IGroupItemProps but not currently read by the panel (see note below)
hoverboolean | IHoverState—Hover state override — see Hover / active
activeboolean | IActiveState—Active state override — see Hover / active
activeClassstring—CSS class applied while active
colorTColor—Text color intent
bgColorTColor—Background color intent
densityTDensity—Panel density
elevationTElevation—Shadow rung
roundedboolean | number | string | TRounded—Corner radius (+ per-corner variants)
borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>—Border (+ per-side variants, borderColor, borderStyle)
paddingboolean | number | string—Padding (+ per-side variants)
marginboolean | number | string—Margin (+ per-side variants)
rippleboolean | { class: string }—Header click-ripple override (forwarded to the header)
fontFamily / fontSize / fontWeight / lineHeight / letterSpacingtypography tokens—Header typography overrides (forwarded to the header) — see OrigamExpansionPanelHeader

Known gap — selectedClass (from IGroupItemProps, the "class applied while selected" analogue of Btn/ItemGroup's selected styling) is part of IExpansionPanelProps but neither OrigamExpansionPanel.vue, OrigamExpansionPanelHeader.vue nor OrigamExpansionPanelContent.vue reads it. Passing it today has no effect — flagging this rather than guessing at intended behaviour.

loadingText was listed here too until 2026-09-07; it is now wired — the panel and its content forward it to the loading renderer's label (see Loading state).

Emits ​

EventPayloadDescription
group:selected{ value: boolean }Fired when the panel's membership in the parent's selected set changes

Slots ​

SlotScopeDescription
default—Content body (used instead of content)
headerEvery OrigamExpansionPanel prop except class / id / style / tag — bound from expansionPanelHeaderProps = filterProps(props, ['class', 'id', 'style', 'tag']) (OrigamExpansionPanel.vue:31-34,234-236). This is a different, larger object than the 5-key scope below — that one is OrigamExpansionPanelHeader's own internal slotProps, only handed to its prepend / append slots.Replaces the entire header
titleSame { collapseIcon, disabled, expanded, expandIcon, readonly } object as prepend / append — OrigamExpansionPanelHeader's own internal slotProps (OrigamExpansionPanelHeader.vue:163-171), not the header scope above.Overrides just the header's title content
prepend{ collapseIcon, disabled, expanded, expandIcon, readonly } — OrigamExpansionPanelHeader's own internal slotProps (OrigamExpansionPanelHeader.vue:163-171), not the header scope above: header and prepend/append do not receive the same object.Leading icon/avatar area of the header
appendSame { collapseIcon, disabled, expanded, expandIcon, readonly } object as prepend (OrigamExpansionPanelHeader.vue:163-171) — again, different from header's scope.Trailing icon/avatar area of the header
loader—Custom loading indicator (line/circular loader replacement)
wrapper{ … content props }Replaces the entire content wrapper

Composition — the ExpansionPanel family ​

  • OrigamExpansionPanels (packages/ds/src/components/ExpansionPanel/OrigamExpansionPanels.vue) — the required group wrapper. Owns v-model (selected panel value(s)), multiple, mandatory, max, and can render panels declaratively from an items: IExpansionPanelProps[] array instead of slotted OrigamExpansionPanel children. Also carries the flat / accordion / popout / inset layout variants. No dedicated doc page exists for it yet — flagging this gap rather than inventing one.
  • OrigamExpansionPanelHeader — the clickable header row; rendered automatically by OrigamExpansionPanel from its own props, but can be overridden via the #header slot.
  • OrigamExpansionPanelContent — the collapsible content region; rendered automatically by OrigamExpansionPanel from content / the default slot, throws if instantiated outside an OrigamExpansionPanel ancestor.

Accessibility ​

  • The header renders as a native <button type="button"> (via OrigamExpansionPanelHeader), with aria-expanded and aria-controls pointing at the content region's id.
  • The content region renders role="region" with aria-labelledby pointing at the header's id.
  • Disabled panels set tabindex="-1" on the header and dim its overlay.

CSS variables ​

VariableDefault sourceDescription
--origam-expansion-panel---backgroundcolor.surface.raisedSeeded by the token build (_light.scss:1777) but not read anywhere — no background/background-color property in OrigamExpansionPanel.vue's <style> block references it. Overriding it currently has no visible effect.
--origam-expansion-panel---colorcolor.text.primarySame gap as above: generated (_light.scss:1778) but not consumed by OrigamExpansionPanel.vue, OrigamExpansionPanelHeader.vue or OrigamExpansionPanelContent.vue — no matching var(...) reference in any of the three.
--origam-expansion-panel---border-radiusradius.smPanel corner radius
--origam-expansion-panel---divider-colorcolor.border.subtleSeparator between stacked panels (non-accordion)
--origam-expansion-panel---divider-opacityopacity.12Separator opacity
--origam-expansion-panel---active-margin-topspace.4Gap added above/below the active panel
--origam-expansion-panel---disabled-colorcolor.text.disabledHeader text color when disabled
--origam-expansion-panel---disabled-overlay-opacity≈opacity.60Overlay opacity when disabled
--origam-expansion-panel__shadow---box-shadowshadow.smPanel elevation shadow layer
--origam-expansion-panel__header---font-size0.9375remHeader font size
--origam-expansion-panel__header---line-height1Header line height
--origam-expansion-panel__header---min-height48pxHeader min height (collapsed)
--origam-expansion-panel__header---min-height-active64pxHeader min height (expanded)
--origam-expansion-panel__header---focus-overlay-opacityopacity.12 (fallback calc(0.12 * 1))Header focus/focus-visible overlay opacity
--origam-expansion-panel__header---overlay-opacity-hover0.04Header hover overlay opacity
--origam-expansion-panel__content---padding-block-start / -endspace.2 / space.4Content vertical padding
--origam-expansion-panel__content---padding-inline-start / -endspace.6Content horizontal padding

Hover overlay — the header's hover overlay opacity is read from --origam-expansion-panel__header---overlay-opacity-hover (0.04, row above). The older --origam-expansion-panel__header---hover-overlay-opacity variable (declared 0) is not read by the component; do not use it.

Header-specific typography variables (--origam-expansion-panel__header---font-family etc.) and the full content token set are documented on OrigamExpansionPanelHeader and OrigamExpansionPanelContent.