Skip to content

KSelectableButtonGroup ​

示例 ​

Single Select

Choose a color

Selected:

Multi Select (teal variant)

Choose colors

Selected:

A responsive grid of selectable buttons supporting single or multiple selection, with optional collapsible behavior.

Props ​

NameTypeDefaultDescription
titlestring—Group title displayed above the buttons.
itemsSelectableButtonItem[]— (required)Array of items with value, label, optional icon, and optional tagCount.
modelValuestring | number | Array<string | number>—Currently selected value(s).
multiplebooleanfalseWhether multiple items can be selected.
collapsiblebooleanfalseWhether to collapse the grid with a "Show more" toggle.
collapseHeightnumber160Maximum height in pixels when collapsed.
loadingbooleanfalseWhether to show a loading skeleton instead of buttons.
variant'violet' | 'teal' | 'amber' | 'rose' | 'green''violet'Color variant for active states and badges.
classstring—Additional CSS classes for the root element.

SelectableButtonItem: { value: string \| number; label: string; icon?: string; tagCount?: number }

Emits ​

NameParametersDescription
update:modelValuestring | number | Array<string | number>Emitted when the selection changes.

Slots ​

NameDescription
—This component does not provide slots.

Basic Usage ​

Framework