SelectionControlGroup

Form & Input
stable

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

Structure

Anatomy

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

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

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

Content slots exposed by this component.

#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

Events emitted by this component.

@update:modelValue
any

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>
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.

Customisation

CSS variables

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

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

Accessibility

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

ARIA roles

group

Keyboard interactions

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

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
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.

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.

Checkbox group

vue

Radio group inline

vue

Disabled group

vue

Ecosystem

Family

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