Skip to main content

Badge

Badges with Avatars

3
import React from 'react';
import { Badge, Avatar } from 'chic-ui';

<>
<Badge type="danger" offset={[-13, 11]} count={3} showCount>
<Avatar src="cat.png" />
</Badge>

<Badge type="success" offset={[-13, 11]} count={0} showZero>
<Avatar src="cat.png" />
</Badge>
</>;

API

import { Badge } from 'chic-ui';
NameTypeDefaultDescription
countnumber0Count/Number to be displayed
limitnumberNumeric limit for the badge
type'primary' | 'secondary' | 'danger' | 'warning' | 'success' | 'info' | 'light''primary'Color of the badge
showZerobooleanfalseShow count zero on the badge
showCountbooleanfalseShow count on the badge
offset[number, number][0,0]Position of the badge
classNamestringProvide external classnames to the component
styleReact.CSSPropertiesOverride default styling of the component