ExpansionPanelContent
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.
<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.
- contentstring | 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.
- tagstring'div'
- HTML element rendered as the content region root.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- Content density: compact, comfortable or default.
- Border-radius applied to the content region root element.
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | number | string
- borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>
- Border shorthand applied to the content region.
- borderTopboolean | number | string
- borderLeftboolean | number | string
- borderBottomboolean | number | string
- borderRightboolean | number | string
- borderBlockboolean | number | string
- borderInlineboolean | number | string
- borderInlineStartboolean | number | string
- borderInlineEndboolean | number | string
- borderBlockStartboolean | number | string
- borderBlockEndboolean | number | string
- borderColorstring
- borderStylestring
- borderTopColorTColor
- borderRightColorTColor
- borderBottomColorTColor
- borderLeftColorTColor
- borderInlineStartColorTColor
- borderInlineEndColorTColor
- borderBlockStartColorTColor
- borderBlockEndColorTColor
- paddingboolean | number | string
- Padding override for the content region root element.
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- marginboolean | number | string
- Margin override for the content region root element.
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- eagerbooleanfalse
- When true, renders content immediately even while the panel is collapsed. Useful for SEO or when the slot must be mounted before first expand.
- Shows a progress loader inside the content area. Supports line, circular and skeleton modes.
- loadingTextstring
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
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Moves 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.
- otherflex
- Display mode of the content region.
- dimensionvar(--origam-space---2)
- Top padding of the inner wrapper (8px).
- dimensionvar(--origam-space---4)
- Bottom padding of the inner wrapper (16px).
- dimensionvar(--origam-space---6)
- Leading padding of the inner wrapper (24px).
- dimensionvar(--origam-space---6)
- Trailing padding of the inner wrapper (24px).
- other1 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
Component prop
Loading state (skeleton)
Ecosystem
Family
Components from the same folder that share conventions and often compose together.