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

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

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

All props accepted by this component, with their type, default value and 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

Content slots exposed by this component.

#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

Events emitted by this component.

@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

Exposed members

Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.

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.

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

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

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

ARIA roles

group

Keyboard interactions

Keyboard interactions
KeyAction
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.

Foundation

Design tokens

Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.

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.

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Collapsible group

vue

Custom activator

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.