Chip
Compact, interactive element for tags, filters, and selections. Supports filled/outlined variants, 5 color schemes, 2 sizes, icon, avatar, selection, and deletion.
{ Chip } from "@pepulux/ui"Color variants — filled
Five semantic colors. Default is neutral gray.
Outlined variant
Border instead of background fill.
Sizes — sm / md
sm is 24px tall, md is 32px tall.
With leading icon
Pass any ReactNode as icon.
With avatar
Pass a rounded image or avatar component as avatar prop.
Selection / filter chips
Clickable chips toggle selected state. Combine selected + onClick.
Selected: Design
Deletable chips
onDelete shows a × button. Clicking it calls onDelete without triggering onClick.
Disabled
Dims the chip and blocks all interaction.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| label* | string | — | Chip text content |
| variant | "filled" | "outlined" | "filled" | Background fill or border-only style |
| color | "default" | "brand" | "success" | "warning" | "error" | "default" | Color scheme |
| size | "sm" | "md" | "md" | Height — sm 24px / md 32px |
| selected | boolean | false | Highlights the chip in its selected state color |
| onClick | () => void | — | Makes the chip interactive (pointer cursor, enter key support) |
| onDelete | () => void | — | Shows × button; clicking calls this without propagating to onClick |
| icon | ReactNode | — | Leading icon rendered before the label |
| avatar | ReactNode | — | Leading avatar rendered before the label (typically a circular image) |
| disabled | boolean | false | Dims the chip and disables all interaction |
| className | string | — | Additional CSS classes |