ExpansionPanels
Container managing a group of ExpansionPanel items. Supports accordion, flat, popout and inset display modes. Props cascade to all child panels via DefaultsProvider.
Structure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<origam-expansion-panels>. The root ① is a flex container wrapping all child panels ②. Mode modifiers (accordion, flat, popout, inset) are applied as root class modifiers.- 1.origam-expansion-panels
- Root flex container. Wraps all panels. Mode modifier classes (--accordion, --flat, --popout, --inset) control layout and border-radius of children.
- 2.origam-expansion-panel (child)
- Each OrigamExpansionPanel child. Border-radius is managed by the parent's CSS selectors (:first-child, :last-child) for mode-specific shapes.
API
Props
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.
- flatbooleanfalse
- Removes the shadow and the border separator between panels.
- itemsArray<IExpansionPanelProps>
- Data-driven array of panel definitions. Each item is spread as props onto an OrigamExpansionPanel instance.
- accordionbooleanfalse
- Collapses all other panels when one is opened (single-open mode). Panels are rendered without gaps and border-radius is managed per position.
- popoutbooleanfalse
- Active panel expands horizontally beyond the container width, creating a popout effect.
- insetbooleanfalse
- Active panel shrinks horizontally to sit inside the container, creating an inset effect.
- Icon passed down to every child panel header for the collapsed state.
- Icon passed down to every child panel header for the expanded state.
- hideActionsbooleanfalse
- Passed down to every child panel header to hide the expand/collapse icon.
- color
- Foreground colour cascaded to all child panels.
- bgColor
- Background colour cascaded to all child panels.
- tagstring'div'
- HTML element rendered at the panels container root.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- disabledboolean
- modelValueany
- Active panel value(s). Bound to v-model. Array for multiple, single value for one.
- multiplebooleanfalse
- Allows multiple panels to be expanded simultaneously.
- mandatorybooleanfalse
- At least one panel must remain open. "force" prevents deselection even if the same item is clicked.
- maxnumber
- selectedClassstring
- Cascaded density to all child panels: compact, comfortable or default.
- Border-radius of the container and cascaded to all child panels.
- 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>
- 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
- 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
- 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, all panel content is rendered on mount even if collapsed.
- Shows a progress loader on the panels container.
- loadingTextstring
- elevationTElevation
- Box-shadow elevation of the panels container.
- activeboolean | IStateEffectConfig
- activeClassstring
- hoverboolean | IStateEffectConfig
- hoverClassstring
API
Slots
Emplacements de contenu exposés par ce composant.
- #default
- Default slot for manual <origam-expansion-panel> children. Used when items prop is not provided.
- #item
- Overrides the default panel rendering for all data-driven items.
- #item.{index}
- Overrides the rendering of a specific panel at the given index.
- #header
- Replaces the header inside all data-driven panels.
- #prepend
- Leading slot for all data-driven panel headers.
- #title
- Title slot for all data-driven panel headers.
- #append
- Trailing slot for all data-driven panel headers.
- #wrapper
- Replaces the content wrapper for all data-driven panels.
- #content
- Body content slot for all data-driven panels.
API
Emits
Événements émis par ce composant.
- @update:modelValueany
- Fired when the active panel selection changes. Carries the new value or array of values.
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 child 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.
- Width of inactive panels in popout mode.
- Width of the active panel in popout mode.
- Width of inactive panels in inset mode.
- Width of the active panel in inset mode.
- Transition duration for the header overlay border-radius animation in accordion mode.
Inclusion
Accessibilité
Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.
Interactions clavier
| Touche | Action |
|---|---|
| Tab | Moves focus between panel headers in sequence. |
Notes
- The container manages group selection state and propagates it to child panels via inject/provide. Each panel header receives aria-expanded and aria-controls independently.
- Visual props (density, color, bgColor, rounded, border) are cascaded via OrigamDefaultsProvider so all child panels share the same visual treatment without per-panel repetition.
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.
- dimensioncalc(100% - 32px)
- Inactive panel width in popout mode.
- dimensioncalc(100% + 16px)
- Active panel width in popout mode.
- dimensioncalc(100% - 32px)
- Active panel width in inset mode.
- durationvar(--origam-motion__duration---slow)
- Transition duration for border-radius animation in accordion header overlay.
Interactif
Playground
Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.
Rendu de l’aperçu en cours…
Usage
Exemples
Extraits de code prêts à coller dans vos templates.
Basic group
Accordion (single open)
Data-driven via items prop
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.