SelectionControlGroup

Form & Input
stable

Groups multiple SelectionControl instances under a shared v-model with inline layout support and a typed item-slot API.

Structure

Anatomie

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

Anatomy of OrigamSelectionControlGroupSchematic of SelectionControlGroup with 3 numbered parts. origam-selection-control (item 1) origam-selection-control (item 2) slot: item / item.{index} 1 2 3
Anatomy of <origam-selection-control-group> — root group ① wraps SelectionControl children ② via OrigamDefaultsProvider. The item slot ③ controls how each item is rendered.
1.origam-selection-control-group
Root div with role="group". Receives the group id as the ARIA id attribute. Applies --inline modifier when inline=true.
2.origam-selection-control-group--inline
Modifier applied when inline=true. Switches flex-direction from column to row.
3[slot: item / item.{index}]
Items slot rendered per entry in the items array. Wrapped in OrigamDefaultsProvider so group-level props (color, type, density, disabled…) are inherited by children.

API

Props

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

disabled
boolean
false
Disables every child SelectionControl in the group.
error
string | boolean
false
Puts every child in error state (danger color).
inline
boolean
false
Switches the group from column (default) to row layout via the --inline modifier class.
falseIcon
Icon shown when a child control is unchecked/false. Forwarded to all children.
trueIcon
Icon shown when a child control is checked/true. Forwarded to all children.
multiple
boolean
Enables multi-selection. When true, modelValue is treated as an array.
name
string
Name attribute forwarded to every child SelectionControl. Auto-generated when absent.
readonly
boolean
false
Makes every child SelectionControl read-only.
modelValue
any
Shared v-model value. Provided down to every SelectionControl child via ORIGAM_SELECTION_CONTROL_GROUP_KEY.
type
string
Native input type forwarded to every child SelectionControl. Usually "checkbox" or "radio".
valueComparator
(a: any, b: any) => boolean
Custom equality function for comparing values when modelValue is non-primitive.
items
Array<any> | Record<string, any>
[]
Array or record of items rendered via the item slot. Each item is available as slot binding.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
color
Intent or custom color forwarded to every child SelectionControl.
tag
string
'div'
Root HTML element. Default is div. The root always has role="group".
density
'default'
Density forwarded to every child control.
ripple
boolean | { class: string }
true
Enables Material ripple effect forwarded to every child control.

API

Slots

Emplacements de contenu exposés par ce composant.

#default
Full override of the group content. Receives the items array. When not provided, the group iterates over items using the item slot.
#item
Template for each item in the items array. Receives item data and index.
#item.{index}
Per-index item slot override. Takes precedence over the generic item slot for that specific index.

API

Emits

Événements émis par ce composant.

@update:modelValue
any

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>
Forwards a filtered subset of props to child components.
Ref<string>
Reactive CSS string generated by useStyle.
ComputedRef<string>
Computed group id (props.id or auto-generated origam-selection-control-group-{uid}).
string
Unique style-sheet ID for this instance (distinct from the logical group id).
() => void
Injects the computed style sheet. Called automatically on mount.
() => void
Removes the injected style sheet. Called automatically on unmount.
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.

Display mode for the group container (always flex).
Stack direction. Switches to row when --inline modifier is applied.
Flex direction when inline=true.
Wrap mode for inline groups.
Gap between child SelectionControl items.

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
TabMoves focus through each child SelectionControl.
SpaceToggles the focused child control.

Notes

  • The root element carries role="group" and is identified by the computed name/id attribute. Screen readers announce the group boundary.
  • OrigamDefaultsProvider forwards type, name, density, color, disabled, readonly and error to every descendant SelectionControl. Child overrides still win.

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
other
flex
Display mode for the group container.
other
column
Default stack direction (column). Row when inline.
dimension
var(--origam-space---2)
Gap between child controls.

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.

Checkbox group

vue

Radio group inline

vue

Disabled group

vue

Écosystème

Famille

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