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.
Aperçu
Rendu de l’aperçu en cours…
defaultRendu de l’aperçu en cours…
with colorRendu de l’aperçu en cours…
filterStructure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<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
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et 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
Emplacements de contenu exposés par ce composant.
- #default
- Default slot for origam-chip children. Receives group helpers (isSelected, select, next, prev, selected) to build custom layouts.
API
Emits
Événements émis par ce composant.
- @update:modelValueany
- Fired when the selected chip(s) change. Emits 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>
- 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.
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.
- 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
Accessibilité
Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.
Rôles ARIA
Interactions clavier
| Touche | 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.
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.
- 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).
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.
Filter chips
Single select (mandatory)
Column layout