Chip

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

Props

NameDefaultDescription
label: stringText to be placed on the chip.
prefixIcon: node | stringElement 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.
suffixIcon: node | stringElement 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: functionIf defined, the prefix icon will be considered a button element. This function will be called when it is clicked.
onClickSuffix: functionIf defined, the suffix icon will be considered a button element. This function will be called when it is clicked.
disabled: booleanfalseIf true, the component will be disabled.
margin: string | objectSize of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge'). You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
tabIndex: number0Value of the tabindex, it also applies to prefix and suffix icons when a function is given.

Examples

Basic usage

Icons