Badge

Renders a number in a badge.

Read more Read less

Example

<.badge count={5} />

Giving it a count of zero will cause it not to render.

<.badge count={0} />

A count of > 1000 will be truncated to 1k.

1.2k
5
<.badge count={1234} size="sm"/>
<.badge count={5}/>
12
1
<.badge count={12} size="sm" type="important"/>
<.badge count={1} type="important"/>
0
42
<.badge count={0} size="sm" type="danger"/>
<.badge count={42} type="danger"/>