Chip

zyra-chip

Compact interactive labels for filters, tags, and selections — supports dismissible and selectable modes.

Frontend

API

All inputs and configuration options for zyra-chip.

PropTypeDefaultDescription
variant'default' | 'info' | 'success' | 'warning' | 'danger' | 'purple''default'Color and semantic meaning
size'sm' | 'md' | 'lg''md'Physical size of the chip
dismissiblebooleanfalseShows a × button to remove the chip
selectablebooleanfalseEnables toggle-selection state
selectedbooleanfalseCurrent selected state (two-way bindable)
disabledbooleanfalsePrevents interaction
dismissed (output)void-Emits when the × button is clicked
selectedChange (output)boolean-Emits the new selected state when toggled

Accessibility

Built to meet WCAG 2.0 AA. These notes cover the key ARIA, keyboard, and interaction behaviours.

  • Dismissible chips include a visually-hidden "Remove" label on the × button
  • Selectable chips use aria-pressed to communicate toggle state
  • Use a group element with role="group" and an aria-label when listing multiple chips