Skip to content

OrigamChipGroup ​

<OrigamChipGroup> wraps <OrigamChip> elements in a scrollable <OrigamSlideGroup> with optional single or multiple selection. Child chips register through useGroup and receive the class named by selectedClass — origam-chip--selected by default — while they are selected.

It renders no markup and no CSS of its own: the root is the slide group, and <OrigamChipGroup> has no <style> block at all.

Basic usage ​

vue
<template>
    <OrigamChipGroup v-model="selected">
        <OrigamChip :value="1" text="Vue"        />
        <OrigamChip :value="2" text="TypeScript" />
        <OrigamChip :value="3" text="Vite"       />
    </OrigamChipGroup>
</template>

<script setup lang="ts">
import { ref } from 'vue'
const selected = ref<number | undefined>(undefined)
</script>

Multiple selection ​

vue
<template>
    <OrigamChipGroup v-model="tags" multiple>
        <OrigamChip :value="'a'" text="Alpha"   />
        <OrigamChip :value="'b'" text="Beta"    />
        <OrigamChip :value="'c'" text="Gamma"   />
    </OrigamChipGroup>
</template>

Mandatory ​

mandatory guarantees that at least one chip is always selected.

vue
<template>
    <OrigamChipGroup v-model="view" mandatory>
        <OrigamChip :value="'grid'" text="Grid" />
        <OrigamChip :value="'list'" text="List" />
    </OrigamChipGroup>
</template>

Props ​

Selection (IGroupProps) ​

PropTypeDefaultDescription
modelValueanyundefinedThe selected chip value, or an array of them when multiple
multiplebooleanundefinedAllow more than one chip to be selected
mandatorybooleanundefinedKeep at least one chip selected
maxnumberundefinedCap on how many chips may be selected at once
disabledbooleanundefinedDisables selection for every registered chip
selectedClassstring'origam-chip--selected'Class applied to the selected chip(s)
valueComparator(a, b) => booleanundefinedCustom equality used to match modelValue against a chip's value

Cascaded to child chips ​

These four are not styling props of the group. They are pushed down to every descendant <OrigamChip> as defaults, through <OrigamDefaultsProvider> — a chip that sets its own value still wins.

Only props the consumer actually passed are forwarded (usePassedProps). That guard matters: TColor includes false and IHoverState / IActiveState include boolean, so Vue coerces every unset one to a concrete false, and a forwarded color: false used to beat the theme's 'origam-chip': { color: 'primary' } — chips lost their themed colour just by being wrapped in a group (#263).

PropTypeDescription
colorTColorDefault foreground for every chip
bgColorTColorDefault surface for every chip
activeIActiveStateDefault active-state object
hoverIHoverStateDefault hover-state object
filterbooleanDefault filter for every chip — a leading check icon (MDI_ICONS.CHECK) expands in, before the chip's own prepend area, while the chip is selected. <OrigamChip> only renders it when it is inside a group, which this always is

Setting filter on the group is therefore enough; you do not have to repeat it on each chip.

vue
<template>
    <OrigamChipGroup v-model="cat" filter>
        <OrigamChip :value="'news'" text="News" />
        <OrigamChip :value="'art'"  text="Art"  />
    </OrigamChipGroup>
</template>

Slide-group surface (ISlideGroupProps) ​

Forwarded to the root <OrigamSlideGroup> via filterProps.

PropTypeDefaultDescription
directionTDirection'horizontal''vertical' stacks the chips and switches the container to vertical scrolling
showArrowsboolean | stringundefinedRender the prev / next affordances
prevIconTIconMDI_ICONS.CHEVRON_LEFT
nextIconTIconMDI_ICONS.CHEVRON_RIGHT
centerActivebooleanundefinedKeep the selected chip scrolled into the centre
tagstring—Element the slide group renders as

Layout mixins ​

margin*, padding*, border* and rounded* are consumed at this level by useMargin / usePadding / useBorder / useRounded and land on the root as utility classes (tokenised values) or inline declarations (custom values).

⛔ column has no effect ​

column emits origam-chip-group--column on the root, and no rule in the design system targets that class — there is no origam-chip-group stylesheet anywhere. Passing it changes nothing.

To stack chips vertically, use the slide group's own axis instead:

vue
<template>
    <OrigamChipGroup v-model="tags" direction="vertical">
        <OrigamChip text="One"   />
        <OrigamChip text="Two"   />
        <OrigamChip text="Three" />
    </OrigamChipGroup>
</template>

That path is real: .origam-slide-group--vertical sets flex-direction: column on the root, the container and the content, and swaps the container's overflow axes.

Emits ​

EventPayloadDescription
update:modelValueanyThe selection changed

Slots ​

SlotScopeDescription
default{ isSelected, select, next, prev, selected }The chips. The scope is the group's own API: isSelected(id), select(id, value), next(), prev(), and the selected id array (auto-unwrapped in templates)

Exposed instance API ​

defineExpose publishes filterProps, css, id, load, unload and isLoaded — the standard useStyle / useProps surface.

Tokens ​

<OrigamChipGroup> declares no tokens of its own — it has no stylesheet. What you see comes from two other components:

  • the root, from OrigamSlideGroup's --origam-slide-group* surface (including --origam-slide-group--vertical---max-height and the two --origam-slide-group--vertical---content-overflow-* channels);
  • each chip, from OrigamChip's --origam-chip* surface — e.g. --origam-chip---background-color (var(--origam-color__surface---overlay)) and --origam-chip---border-radius (var(--origam-radius---full), i.e. 9999px).

Spacing between chips is not a token: it comes from the slide group's own layout.