Chip

Data Display
stable

Compact interactive element for tags, filters and selections with icon, close and group support.

Preview

Rendering the live preview…

default

Rendering the live preview…

primary

Rendering the live preview…

success

Rendering the live preview…

closable

Rendering the live preview…

outlined

Rendering the live preview…

label

Structure

Anatomy

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

Anatomy of OrigamChipSchematic of the Chip component with 7 numbered internal parts. icon Label / #default slot close 1 2 3 4 5 6 7 ⑥ overlay + ⑦ underlay = absolute layers, opacity:0 at rest
Anatomy of <origam-chip> — 7 internal parts. The chip is a full-round pill by default. Absolute layers (overlay ⑥, underlay ⑦) handle interaction states.
1.origam-chip
Root element. Renders as <span> by default; switches to <a> when a link prop is set. Pill shape by default (border-radius: 9999px).
2.origam-chip__prepend
Leading area. Renders prependIcon or prependAvatar, or the #prepend slot. Present only when hasPrepend.
3.origam-chip__content
Label zone. Contains the #default slot text or the text prop. Has data-no-activator attribute.
4.origam-chip__filter
Filter check icon area. Visible only when filter=true and the chip is selected inside a ChipGroup. Uses OrigamExpandX transition.
5.origam-chip__close
Close button (OrigamBtn variant="text"). Present when closable=true or the #close slot is used.
6.origam-chip__overlay
Interaction overlay. opacity: 0 at rest → 0.24 on hover → 0.12 on focus. Present only when the chip is clickable.
7.origam-chip__underlay
Reserved absolute underlay. position: absolute. Currently unpainted (no background).

API

Props

All props accepted by this component, with their type, default value and description.

closable
boolean
false
Adds a close button that emits click:close and hides the chip via v-model.
closeIcon
'mdi-close-circle-outline'
Icon for the close button.
closeLabel
string
'origam.close'
Accessible aria-label for the close button.
draggable
boolean
false
Makes the chip draggable via the HTML drag API.
filter
boolean
false
Shows a filter icon (check) when the chip is selected inside a ChipGroup.
filterIcon
'mdi-check'
Icon shown in filter mode when the chip is selected.
label
boolean
false
Switches border-radius to a square shape (label style).
link
boolean
false
Enables link behaviour when href or to is set.
pill
boolean
false
Removes horizontal padding on prepend/append areas for a pill layout with flush avatars.
text
string
Chip label text. Can also be set via the default slot.
modelValue
boolean
true
Controls the chip visibility. Use v-model to bind two-way.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
appendAvatar
string
Image URL for an avatar in the append area.
appendIcon
Icon displayed after the chip label.
prependAvatar
string
Image URL for an avatar in the prepend area.
prependIcon
Icon displayed before the chip label.
prependAriaLabel
string
appendAriaLabel
string
tag
string
'span'
HTML element rendered at the root.
color
Intent or custom color applied to the chip surface.
bgColor
Background color override.
ripple
boolean | { class: string }
true
Enables the ripple effect on click.
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
false
Applies a border. Pass true for outlined style.
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderColor
string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
Border-radius token or boolean. Default is pill (full round).
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
density
'default'
Adjusts padding density.
value
any
disabled
boolean
false
Disables the chip. Applies 30% opacity and removes pointer events.
selectedClass
string
href
string
Renders the chip as an anchor tag pointing to this URL.
replace
boolean
to
RouteLocationRaw
Vue Router destination.
exact
boolean
size
'default'
Controls the chip height and font-size via design tokens.
elevation
TElevation
Box-shadow elevation token.
active
boolean | IStateEffectConfig
activeClass
string
hover
boolean | IStateEffectConfig
hoverClass
string
fontSize
TFontSize
fontWeight
TFontWeight
letterSpacing
TLetterSpacing
fontFamily
TFontFamily
textTransform
TTextTransform

API

Slots

Content slots exposed by this component.

#filter
Custom filter icon rendered when the chip is selected in filter mode.
#default
Main chip label content. Receives group selection context props.
#close
Custom close button content. Receives closeIcon prop.
#prepend
Replaces the prepend icon/avatar area.
#append
Replaces the append icon/avatar area.

API

Emits

Events emitted by this component.

@update:modelValue
any
Fired when the chip is dismissed. Sets modelValue to false.
@click
MouseEvent
Fired on chip click.
@click:close
MouseEvent
Fired when the close button is clicked.
@click:append
MouseEvent
Fired when the append area is clicked.
@click:prepend
MouseEvent
Fired when the prepend area is clicked.
@group:selected
{ value: boolean }
@update:group
unknown
Fired when the group selection changes (when inside a ChipGroup).

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>
Utility to forward a filtered subset of props to a child component.
Ref<string>
Reactive CSS string generated by useStyle from the computed chipStyles.
string
Unique style-sheet ID for this instance.
() => 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 into the DOM.

Customisation

CSS variables

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

Default chip background color.
Default chip foreground (text/icon) color.
Border radius. Full pill by default. Overridden by the label modifier to radius.sm.
Chip label font weight.
Opacity applied when the chip is disabled.
Density offset: 0 (default), -8px (compact).
Overlay opacity at rest. Animates to 0.24 on hover and 0.12 on focus/active.

Inclusion

Accessibility

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

Keyboard interactions

Keyboard interactions
KeyAction
Enter / SpaceActivates the chip (fires click event) when it is clickable.
TabMoves focus to the next interactive element. Chip is focusable only when clickable (tabindex=0).

Notes

  • The close button receives an aria-label from the closeLabel prop, defaulting to the translated "Close" string.
  • When disabled=true, the chip receives the disabled attribute and pointer events are removed.
  • The overlay span receives focus-visible styles to indicate keyboard focus visually.

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
color
var(--origam-color__surface---overlay)
Default chip background.
dimension
var(--origam-radius---full)
Full-pill border radius by default.
fontWeight
var(--origam-font__weight---regular)
Chip label font weight.
color
var(--origam-color__action--primary---bg)
Background when the chip is selected inside a ChipGroup.
number
var(--origam-opacity---0)
Overlay opacity at rest (0). Animates on hover/focus/active.
duration
var(--origam-motion__duration---medium)
Transition duration for overlay opacity animation.

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.

Basic chips

vue

Filter chips (ChipGroup)

vue

Sizes

vue

Ecosystem

Family

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