Code

The badge component usage and API reference.

API

This component extends the native <div>arrow-up-right API. That's why the className prop is not included in the table.

Props
Data Type
Required

children

string

βœ…

className

string

❌

color

grey | blue | green | yellow | red | indigo | purple | lime | teal | orange | pink

❌

isCounter

string

❌

Props description

chevron-rightchildrenhashtag

In this case, the children of the Badge component is just a plain text string, which means it's not any kind of HTML or JSX code. It's just a simple message that we want to show on the Badge.

chevron-rightcolorhashtag

Collection of available colors to implement on the Badge component (Check the table above).

chevron-righticonBeforehashtag

Collection of available icons to implement on the Badge component. This collection is based on the Telicon icon collection that can be found herearrow-up-right. This would render the icon right before the children.

chevron-righticonAfterhashtag

Collection of available icons to implement on the Badge component. This collection is based on the Telicon icon collection that can be found herearrow-up-right. This would render the icon right after the children.

chevron-rightisCounterhashtag

Property that, if it has a true value, it will implement style changes on the Badge component.

circle-exclamation

Example

Last updated