Examples
Examples
💡 Pro Tip
For A11y support, it's essential to provide an aria-label property for the Chip, formatted as "Dismiss + {Content}".
Basic Usage
The Chip only needs a minimal amount of provided data to be used. Simply pass in a label text and the relevant aria-label property.

Prefix
For optional prefixed content in the Chip component, you can include cosmos-flags, icons, avatars, or custom content.

Best Practices:
- Consider the prefixed content as a meaningful embellishment to the provided text.
Shape
The shape of the Chip can be controlled via the shape property.

Best Practices:
- Use the 'pill' shape when in a B2C context.
- use the 'rectangle' shape when in a B2B context.
Appearance

Listening to Events
The Chip supports listening to a dismiss event which is triggered when the dismiss button is clicked.