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

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et 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

Emplacements de contenu exposés par ce composant.

#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

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

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

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

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

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Rôles ARIA

region

Interactions clavier

Interactions clavier
ToucheAction
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.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

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.

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Sous-partie interne : elle est injectée par son composant parent et ne peut pas se rendre seule. Voir la fiche du composant parent pour un exemple vivant.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Default slot content

vue

Component prop

vue

Loading state (skeleton)

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.