Badge component - Component API

Here is the API for the component:

size enum

Acceptable values:

  1. small
  2. medium
  3. large
type enum

Acceptable values:

  1. filled
  2. inverted
  3. outlined
color enum

Acceptable values:

  1. neutral
  2. neutral-dark-mode
  3. highlight
  4. critical
  5. success
  6. warning
text string

The text of the badge or value of the screen-reader only element if isIconOnly is set to true.

If no text value is defined an error will be thrown.

icon string

Use this parameter to show an icon. Acceptable value: any Flight icon name.

isIconOnly boolean

This indicates if the button will only contain an icon.

Notice: an internal check is in place to ensure that accessible text is still applied to the component.

...attributes

...attributes spreading is supported on this component.