Skip to content

Chip

A compact element representing an attribute, category, or action. Chips are used to label, filter, or organize items.

Installation

bash
npx @zizigy/capsule add Chip

Usage

Basic Chip

html
<capsule-chip>Basic Chip</capsule-chip>

Variants

html
<capsule-chip variant="outline">Outline</capsule-chip>
<capsule-chip variant="ghost">Ghost</capsule-chip>

Sizes

html
<capsule-chip size="sm">Small</capsule-chip>
<capsule-chip>Default</capsule-chip>
<capsule-chip size="lg">Large</capsule-chip>

Color

html
<capsule-chip color="primary">primary</capsule-chip>
<capsule-chip color="success">success</capsule-chip>
<capsule-chip color="danger">danger</capsule-chip>
<capsule-chip color="warning">warning</capsule-chip>

Attributes

AttributeTypeDefaultDescription
variantstring-Chip style variant
sizestring-Chip size
typestring-Type attribute
colorstring-Chip color (e.g. 'primary', 'success', 'danger', HEX, RGB, etc.)

Variant Values

  • outline - Outlined chip with border
  • ghost - Ghost chip without background

Size Values

  • sm - Small
  • lg - Large

Accessibility

  • ✅ Keyboard interaction support
  • ✅ ARIA attributes for screen readers

Released under the MIT License.