Chip
The
Chip
component can be used to display content in a compact and colorful box. Chips are best
used to display a single value, a small amount of text, or an icon. For example, chips can be used
to display tags in a table.Basic usage
Variant, size, and color
The look and feel of the chip can be easily changed.
Auto color
The color of the chip is automatically determined based on the text with color set to
auto
. This
is useful if you want to display a list of tags.Component API
Name | Description | Default |
---|---|---|
children | React.ReactNode Chip contents. | |
size | "sm" | "md" | "lg" Size of the chip. | md |
color | "primary" | "secondary" | "dark" | "gray" | "red" | "pink" | "grape" | "violet" | "indigo" | "blue" | "cyan" | "teal" | "green" | "lime" | "yellow" | "orange" | "success" | "error" | "auto" Color of the chip.
"auto" will automatically choose a color for string or number children. | primary |
variant | "filled" | "outline" | "light" Appearance of the chip. | light |