ListGroup

Data Display
stable

Collapsible group inside a List. Renders a header activator and a nested items container that expands/collapses with an animated transition.

Structure

Anatomie

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

Anatomy of OrigamListGroupSchematic of the ListGroup component with 5 numbered internal parts. origam-list-group-activator (.origam-list-group__activator) #activator slot → default: origam-list-item (.origam-list-group__header) div.origam-list-group__items (v-if isOpen, role=group) --origam-list---indent-padding applied to children #items slot 1 2 3 origam-list-group
Anatomy of <origam-list-group> — 3 primary zones: root ①, activator wrapper ②, and the collapsible items container ③ with an animated OrigamExpandY transition.
1.origam-list-group
Root element. Carries modifier classes: --prepend, --append, --fluid, --open. Uses v-contrast directive for automatic contrast correction.
2.origam-list-group__activator
OrigamListGroupActivator wrapper around the header slot. Registers the activator context for nested group detection (useNestedGroupActivator).
3.origam-list-group__items
Collapsible container. Rendered only when isOpen is true (v-if). Wrapped in OrigamExpandY for enter/leave animation. Sets role="group" and aria-labelledby pointing to the activator id.

API

Props

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

collapseIcon
'mdi-chevron-up'
Icon shown in the activator when the group is expanded.
expandIcon
'mdi-chevron-down'
Icon shown in the activator when the group is collapsed.
fluid
boolean
false
Removes the nested indent (list-indent-size = 0). Useful for flat-hierarchy navigation drawers.
title
string
Title text rendered inside the default activator ListItem.
value
any
Value used by the nested item system to track the open/closed state. Required when using nested or controlled open state.
tag
string
'div'
HTML element rendered at the root of the list group.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
color
Foreground color inherited by all descendant ListItems via OrigamDefaultsProvider.
bgColor
Background color inherited by all descendant ListItems via OrigamDefaultsProvider.
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
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
false
Applies a border to the group root.
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
Border-radius token applied to the group root.
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
appendAvatar
string
appendIcon
Icon forwarded as appendIcon to the default activator ListItem. Overrides the toggle icon when set.
prependAvatar
string
prependIcon
Icon forwarded as prependIcon to the default activator ListItem.
prependAriaLabel
string
appendAriaLabel
string
activeClass
string
hover
boolean | IStateEffectConfig
hoverClass
string

API

Slots

Emplacements de contenu exposés par ce composant.

#default
Full override of both the activator and the items container. When used, the activator and items slots are ignored.
#activator
Custom activator element. Receives events (click handler), props (id + class), isOpen (boolean), toggleIcon (TIcon).
#items
Items rendered inside the collapsible zone below the activator.

API

Emits

Événements émis par ce composant.

@click:activator
{ open: boolean; event: Event }
Fired when the user clicks the activator header. Carries the raw MouseEvent. The group toggles its own open state; this emit is for external listeners.

API

Membres exposés

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

Ref<boolean>
Reactive ref reflecting whether the group is currently expanded.
<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to a child component.
Ref<string>
Reactive CSS string generated by useStyle.
ComputedRef<string>
Computed unique ID used for aria-labelledby on the items container.
() => 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 into the DOM.

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.

Amount by which nested items are indented. Set to 0 by --fluid modifier.
Width of the prepend area accounted for in the nested indent calculation.
Cumulative indent from parent groups. Grows with each nesting level.
Overlay opacity of the activator item when the group is open. Defaults to 0 (no tint on active header).
Overlay opacity on hover when the activator is in active/open state. A scoped calc (0.04 * 1) is applied in the component SCSS.

Inclusion

Accessibilité

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

Rôles ARIA

group

Interactions clavier

Interactions clavier
ToucheAction
Enter / SpaceActivates the activator ListItem and toggles the group open/closed.
TabMoves focus through the activator and then the expanded items.

Notes

  • The items container carries role="group" and aria-labelledby pointing to the activator element id, so screen readers announce the group name when entering the nested list.
  • The v-contrast directive automatically adjusts the foreground color for sufficient contrast against the bgColor.

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
var(--origam-space---4)
Default indentation per nesting level.
dimension
var(--origam-space---4)
Prepend area width added to the indent calculation when a prepend zone is present.

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.

Collapsible group

vue

Custom activator

vue

Écosystème

Famille

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