ChipA compact element for representing an input, attribute, or action.
The Chip component is used to represent attributes, tags, or actions in a compact form. It supports various styles, sizes, and can include leading/trailing icons or a dismiss button.
Install the component from your command line.
The
The Chip component comes in two sizes to accommodate different use cases.
Choose between neutral and accent styles to control the visual emphasis.
Chips can include leading and trailing icons to provide additional context or actions.
Chips can be made dismissible by adding the isDismissible prop and an onDismiss handler.
DefaultAccent With IconDismissible
npm install @raystack/apsara
import { Chip } from '@raystack/apsara/v1' <Chip variant="outline" size="small">Label</Chip>
Chip
component accepts the following props:
variant
: Visual style variant ("outline"
|"filled"
, default: "outline")size
: Size of the chip ("small"
|"large"
, default: "small")style
: Color style ("neutral"
|"accent"
, default: "neutral")leadingIcon
: ReactNode to display as an icon before the labeltrailingIcon
: ReactNode to display as an icon after the labelisDismissible
: Boolean to show a dismiss button (replaces trailingIcon)onDismiss
: Callback function when dismiss button is clickedchildren
: Content to display inside the chipclassName
: Additional CSS class names
loading...
loading...
loading...
loading...
loading...