Chip

Chips are elements that represent status, complementary information, or association between elements.

Props

NameTypeDescriptionDefault
labelstringText to be placed on the chip.-
prefixIconstring | (React.ReactNode & React.SVGProps <SVGSVGElement>)Element used as icon, placed before the chip label. Note that if the passed value is an URL (string), the color styling tokens will not be applied to the image. For the icon to display correctly, an SVG must be provided to the prop inheriting the component's styles.-
suffixIconstring | (React.ReactNode & React.SVGProps <SVGSVGElement>)Element used as icon, placed after the chip label. Note that if the passed value is an URL (string), the color styling tokens will not be applied to the image. For the icon to display correctly, an SVG must be provided to the prop inheriting the component's styles.-
onClickPrefix() => voidIf defined, the prefix icon will be considered a button element. This function will be called when it is clicked.-
onClickSuffix() => voidIf defined, the suffix icon will be considered a button element. This function will be called when it is clicked.-
disabledbooleanIf true, the component will be disabled.false
margin'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | MarginSize of the margin to be applied to the component. You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.-
tabIndexnumberValue of the tabindex attribute applied to both the component and the prefix and suffix icons when a function is given.0

Examples

Basic usage

Icons