ExpansionPanelContent

Layout & Structure
stable

Animated content region revealed when the parent ExpansionPanel is expanded. Has role="region" and aria-labelledby pointing to the header.

Structure

Anatomy

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

Anatomy of OrigamExpansionPanelContentSchematic of the ExpansionPanelContent component with 3 numbered internal parts. .origam-expansion-panel-content (role=region) .origam-expansion-panel-content__wrapper 1 2
Anatomy of <origam-expansion-panel-content> — 2 internal parts. Root ① has role="region" and aria-labelledby pointing to the sibling header. Inner wrapper ② carries the padding tokens.
1.origam-expansion-panel-content
Root element. role="region" with aria-labelledby referencing the header ID. Displayed via OrigamExpandY animated transition.
2.origam-expansion-panel-content__wrapper
Inner padding wrapper. Hosts the default slot, the loader slot, and the progress indicator.

API

Props

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

content
string | Component
Content to render inside the panel body. Accepts a plain string or a Vue component reference. Superseded by the default slot.
color
Foreground colour applied to the content region.
bgColor
Background colour of the content region surface.
tag
string
'div'
HTML element rendered as the content region root.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
density
'default'
Content density: compact, comfortable or default.
Border-radius applied to the content region root 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
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
Border shorthand applied to the content region.
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
Padding override for the content region root element.
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
Margin override for the content region root element.
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, renders content immediately even while the panel is collapsed. Useful for SEO or when the slot must be mounted before first expand.
loading
false
Shows a progress loader inside the content area. Supports line, circular and skeleton modes.
loadingText
string

API

Slots

Content slots exposed by this component.

#loader
Custom loader shown when loading is active. Defaults to OrigamProgress (line/circular) or three OrigamSkeleton rows (skeleton mode).
#default
Panel body content. Rendered inside the inner __wrapper div when the panel is expanded (or eager).

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.

Display mode of the content region root. Defaults to flex.
Top padding of the inner wrapper.
Bottom padding of the inner wrapper.
Leading (left) padding of the inner wrapper.
Trailing (right) padding of the inner wrapper.
Flex grow/shrink/basis of the inner wrapper inside the flex root.
Maximum width of the inner wrapper. Prevents overflow.

Inclusion

Accessibility

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

ARIA roles

region

Keyboard interactions

Keyboard interactions
KeyAction
TabMoves focus into and out of the content region when it is expanded.

Notes

  • The content root carries aria-labelledby pointing to the sibling header ID, associating the region with its label for screen readers.
  • Uses v-show to hide the content — it remains in the DOM (unless eager=false and not yet revealed) so focus management works correctly after expand.
  • Content is lazily rendered on first expand (unless eager is true). After first expand, the DOM is preserved on collapse via v-show.

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
other
flex
Display mode of the content region.
dimension
var(--origam-space---2)
Top padding of the inner wrapper (8px).
dimension
var(--origam-space---4)
Bottom padding of the inner wrapper (16px).
dimension
var(--origam-space---6)
Leading padding of the inner wrapper (24px).
dimension
var(--origam-space---6)
Trailing padding of the inner wrapper (24px).
other
1 1 auto
Flex shorthand of the inner wrapper.

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.

Default slot content

vue

Component prop

vue

Loading state (skeleton)

vue

Ecosystem

Family

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