swatch-group

Swatch Group

A row or column of swatches for choosing one option, such as a colour, or several, as in a filter; joins a Field around it.

States: Default, Disabled

Parts

PartFileDoes
SwatchGroupSwatchGroup.vueGroups swatches so the user can choose one or several options.
SwatchGroupItemSwatchGroupItem.vueLets the user select one option within its swatch group.

Anatomy

<SwatchGroup>
  <SwatchGroupItem />
</SwatchGroup>

Styling

PartRecipe
SwatchGroupswatch-group

Install

Writes 3 files into components/ui/swatch-group/. For agents, npx @frontic/ui docs swatch-group prints this reference as markdown; the MCP server serves the same.

Installs with it
swatch
use-field-control
npm packages
@vueuse/core
class-variance-authority
reka-ui

Built from

API reference

SwatchGroup SwatchGroup.vue

Groups swatches so the user can choose one or several options.

PropTypeDefault
rovingFocusbooleantrue
disabledbooleanfalse
orientation'vertical' | 'horizontal''horizontal'
dirDirection—
loopbooleantrue
asChildbooleanfalse
asAsTag | Component—
namestring—
requiredbooleanfalse
typeSingleOrMultipleType—
modelValueAcceptableValue | AcceptableValue[]—
defaultValueAcceptableValue | AcceptableValue[]—
classClassValue—
sizeSwatchSize—
shapeSwatchShape—
labelClassClassValue—
EventPayload
update:modelValuepayload: AcceptableValue | AcceptableValue[]
Recipe swatch-groupSets
base: swatch-group 3 properties
orientation: horizontaldefault 1 property
orientation: vertical 2 properties

SwatchGroupItem SwatchGroupItem.vue

Example
State