ExpansionPanels

Layout & Structure
stable

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.

Anatomy of OrigamExpansionPanelsSchematic of the ExpansionPanels container with 3 numbered internal parts. .origam-expansion-panels origam-expansion-panel ① (slot item 0) origam-expansion-panel ② (slot item 1) 1 2
Anatomy of <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.

flat
boolean
false
Removes the shadow and the border separator between panels.
items
Array<IExpansionPanelProps>
Data-driven array of panel definitions. Each item is spread as props onto an OrigamExpansionPanel instance.
accordion
boolean
false
Collapses all other panels when one is opened (single-open mode). Panels are rendered without gaps and border-radius is managed per position.
popout
boolean
false
Active panel expands horizontally beyond the container width, creating a popout effect.
inset
boolean
false
Active panel shrinks horizontally to sit inside the container, creating an inset effect.
expandIcon
'mdi-chevron-down'
Icon passed down to every child panel header for the collapsed state.
collapseIcon
'mdi-chevron-up'
Icon passed down to every child panel header for the expanded state.
hideActions
boolean
false
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.
tag
string
'div'
HTML element rendered at the panels container root.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
disabled
boolean
modelValue
any
Active panel value(s). Bound to v-model. Array for multiple, single value for one.
multiple
boolean
false
Allows multiple panels to be expanded simultaneously.
mandatory
boolean
false
At least one panel must remain open. "force" prevents deselection even if the same item is clicked.
max
number
selectedClass
string
density
'default'
Cascaded density to all child panels: compact, comfortable or default.
Border-radius of the container and cascaded to all child panels.
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>
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
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
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, all panel content is rendered on mount even if collapsed.
loading
false
Shows a progress loader on the panels container.
loadingText
string
elevation
TElevation
Box-shadow elevation of the panels container.
active
boolean | IStateEffectConfig
activeClass
string
hover
boolean | IStateEffectConfig
hoverClass
string

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:modelValue
any
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

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

Source
dimension
calc(100% - 32px)
Inactive panel width in popout mode.
dimension
calc(100% + 16px)
Active panel width in popout mode.
dimension
calc(100% - 32px)
Active panel width in inset mode.
duration
var(--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

vue

Accordion (single open)

vue

Data-driven via items prop

vue

Écosystème

Famille

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