ChipGroup
Scrollable group of Chip elements with single or multi-select, filter support, and column layout option. Propagates color/bgColor tokens to descendant chips via OrigamDefaultsProvider.
Preview
Rendering the live preview…
defaultRendering the live preview…
with colorRendering the live preview…
filterStructure
Anatomy
Visual breakdown of the component's internal structure with BEM class call-outs.
<origam-chip-group> — 4 internal parts. The root ① wraps a origam-slide-group ② which contains chip children ③. An origam-defaults-provider ④ propagates visual token props to all descendant chips.- 1.origam-chip-group
- Root element. BEM modifier --column switches to a wrapping grid layout.
- 2origam-slide-group
- Horizontal scrollable container with prev/next navigation buttons. Receives filtered SlideGroup props.
- 3origam-chip (slot children)
- Child chip elements provided via the default slot. Receive selection state from the group context (ORIGAM_CHIP_GROUP_KEY).
- 4origam-defaults-provider
- Injects default color, bgColor and other visual props into all descendant origam-chip elements.
API
Props
All props accepted by this component, with their type, default value and description.
- columnbooleanfalse
- Switches the layout from horizontal scrollable row to a wrapping column grid.
- filterbooleanfalse
- Activates filter mode: selected chips display a check icon (passed down to chip children as a default prop).
- valueComparator(a: any, b: any) => boolean
- Custom comparator used to determine if a chip value matches the modelValue. Defaults to strict equality.
- activeIActiveState
- hoverIHoverState
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- tagstring'div'
- HTML element for the root wrapper.
- disabledbooleanfalse
- Disables all chips inside the group.
- modelValueany
- Currently selected chip value(s). Supports v-model with a single value or an array in multiple mode.
- multiplebooleanfalse
- Allows multiple chips to be selected simultaneously.
- mandatorybooleanfalse
- At least one chip must remain selected; deselecting the last chip is prevented.
- maxnumber
- Maximum number of chips that can be selected when multiple=true.
- selectedClassstring'origam-chip--selected'
- CSS class added to active/selected chips. Passed down to children via group context.
- color
- Default foreground colour propagated to all descendant chips via OrigamDefaultsProvider.
- bgColor
- Default background colour propagated to all descendant chips.
- 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
- 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
- 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
- Border-radius token or boolean applied to the group wrapper.
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | number | string
- centerActiveboolean
- Icon for the "scroll next" navigation button of the SlideGroup.
- Icon for the "scroll previous" navigation button of the SlideGroup.
- showArrowsboolean | string
- directionTDirection'horizontal'
- Scrolling direction of the underlying SlideGroup: horizontal or vertical.
- mobileBreakpointnumber | TBreakpoint
API
Slots
Content slots exposed by this component.
- #default
- Default slot for origam-chip children. Receives group helpers (isSelected, select, next, prev, selected) to build custom layouts.
API
Emits
Events emitted by this component.
- @update:modelValueany
- Fired when the selected chip(s) change. Emits the new value or array of values.
API
Exposed members
Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.
- <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.
- string
- Unique style-sheet ID for this instance.
- () => void
- Injects the computed style sheet. Called on mount.
- () => void
- Removes the injected style sheet. Called on unmount.
- 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.
- Default chip background propagated to all chips in the group.
- Chip border radius (pill by default).
- Selected chip background colour.
- Selected chip foreground colour.
Inclusion
Accessibility
ARIA roles, keyboard navigation and focus management. Sourced from the real component template.
ARIA roles
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Moves focus between chips inside the group. |
| Enter / Space | Selects or deselects the focused chip. |
| Arrow Left / Right | Scrolls the slide group when overflow is present (handled by OrigamSlideGroup). |
Notes
- The slide group container exposes a logical grouping of selectable chip controls. Each chip carries its own role and aria-selected.
- Color tokens are propagated via OrigamDefaultsProvider — children that set their own color still take precedence over the group defaults.
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.
- colorvar(--origam-color__surface---overlay)
- Default chip background (propagated to children).
- colorvar(--origam-color__action--primary---bg)
- Background of the selected chip state.
- dimensionvar(--origam-radius---full)
- Chip border radius.
- durationvar(--origam-motion__duration---medium)
- Chip transition duration (hover, selection).
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.
Filter chips
Single select (mandatory)
Column layout