Chip API
- Component status:
-
deprecated
Import
Section titled “Import”import { Chip } from "@stratakit/structures";// ORimport * as Chip from "@stratakit/structures/Chip";Chip (default) Deprecated
Section titled “Chip (default) Deprecated ”Chip is a UI component used to represent an item, attribute, or action in a compact visual style.
It supports two visual variants: solid for primary emphasis and outline for less prominent states.
Example:
<Chip label="Value" /><Chip label="Value" variant="outline" />ReactNode (required) The label displayed inside the chip.
onDismiss
Section titled “onDismiss”(() => void) | undefined (optional) undefined Callback invoked when the dismiss (”❌”) button is clicked.
If undefined, the dismiss button will not be rendered.
variant
Section titled “variant”"outline" | "solid" | undefined (optional) "solid" The variant style of the Chip. Use “solid” for primary states and “outline” for less prominent states.
Additional props
Section titled “Additional props”Chip.Root Deprecated
Section titled “Chip.Root Deprecated ”Root component of the compositional Chip component.
Example:
<Chip.Root> <Chip.Label>Label</Chip.Label> <Chip.DismissButton onClick={onClick} /></Chip.Root>variant
Section titled “variant”"outline" | "solid" | undefined (optional) "solid" The variant style of the Chip. Use “solid” for primary states and “outline” for less prominent states.
Additional props
Section titled “Additional props”Chip.Label Deprecated
Section titled “Chip.Label Deprecated ”Label component that should be used with the compositional Chip component.
Additional props
Section titled “Additional props”Chip.DismissButton Deprecated
Section titled “Chip.DismissButton Deprecated ”Dismiss button component that should be used with the compositional Chip component.
string | undefined (optional) "Dismiss" Label for the dismiss button.
The final accessible name of the dismiss button is a combination of this label and the text content of Chip.Label.