Skip to content
Forms

Chip

Server Component

Interactive filter/selection chip — toggleable, dismissible, with icon and avatar slots.

Import

tsx
import { Chip } from "@cronus-ui/ui";
bash
npx cronus-ui add chip

Examples

API Reference

Generated from the component's exported types.

ChipProps

Extends Omit<HTMLAttributes<HTMLElement>, "color">, Omit<VariantProps<typeof chipVariants>, "interactive" | "selected">

Skip ChipProps props table
PropTypeDefaultDescription
variant
"solid" | "soft" | "outline""soft"Visual treatment: `solid` fill, `soft` 15% tint, or `outline`.
color
"neutral" | "primary" | "success" | "warning" | "error" | "info""neutral"Semantic hue applied by the variant recipe.
size
"sm" | "md" | "lg""md"Pill height / typography preset.
selected
booleanundefinedToggle state for filter-style chips. Any non-`undefined` value renders the chip as a `<button>` with `aria-pressed`; while `true` it also gains a leading check mark and emphasized styling.
icon
ReactNodeLeading icon slot rendered before the label (e.g. a lucide icon).
avatar
ReactNodeLeading avatar slot (an `img`, `Avatar`, …) clipped to a circle and sized by `size`.
onRemove
() => voidMakes the chip dismissible. On a static chip this renders a real, focusable remove button (Enter/Space activate it); on an interactive chip the affordance is decorative and Delete or Backspace on the focused chip removes it instead. Removal never triggers `onClick`, and removal clicks never propagate to ancestor click handlers.
disabled
booleanfalseDisables the chip and its remove affordance.
labels
Partial<ChipLabels>Override any subset of the built-in screen-reader strings. See .

ChipGroupProps

Extends HTMLAttributes<HTMLDivElement>

Skip ChipGroupProps props table
PropTypeDefaultDescription
aria-label
stringAccessible name announcing what the chip collection represents.