Skip to main content

Component <Badge />

Props

PropsTypeMeaningPossible values
sizestringChange badge sizesm / md
shapestringChange badge shaperounded / squared
colorstringChange badge background colorprimary / green / yellow / blue / turquoise / grey
closebooleanEnable/disable access to the action on closetrue / false
handleClosefunctionAction, after x-mark was clicked() => {...}



Sizes

Examples:

<Badge size="sm">Lorme</Badge>
<Badge size="md">ipsum</Badge>
Lorme
ipsum



Shapes

Examples:

<Badge shape="squared">Lorme</Badge>
<Badge shape="rounded">ipsum</Badge>
Lorme
ipsum



Colors

Examples:

<Badge color="primary">Primary</Badge>
<Badge color="green">Green</Badge>
<Badge color="yellow">Yellow</Badge>
<Badge color="blue">Blue</Badge>
<Badge color="turquoise">Turquoise</Badge>
<Badge color="grey">Grey</Badge>
Primary
Green
Yellow
Blue
Turquoise
Grey



With action x-mark

<Badge close handleClose={() => {}}>Lorme</Badge>
<Badge close handleClose={() => {}}>ipsum</Badge>
<Badge close handleClose={() => {}}>Text</Badge>
Lorme
ipsum
text