ExpansionPanelContent
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.
<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.
- 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
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
Interactions clavier
| Touche | 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.
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.
- 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.
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
Component prop
Loading state (skeleton)
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.