Skip to main content

Component <Tag />

Props

PropsTypeMeaningPossible values
sizestring / objectChange badge size{ default: sm / md / lg, smRes: sm / md / lg, mdRes: sm / md / lg, lgRes: sm / md / lg } / sm / md / lg
weightstringChange text font weightlight / normal / semibold / bold
shapestringChange badge shaperounded / squared
colorstringChange badge background colorred / green / grey / white
iconstringAdd icont before the textAny icon name
onClickfunction / nullAction, after x-mark was clicked() => {...} / null



Sizes

Examples:

<Tag size="sm">Easy</Tag>
<Tag size="md">Medium</Tag>
<Tag size="lg">Hard</Tag>
<Tag size={{ default: 'sm', smRes: 'sm', mdRes: 'md', lgRes: 'lg' }}>Responsive</Tag>
Easy
Medium
Hard
Responsive



Weight

Examples:

<Tag weight="light">Some text</Tag>
<Tag weight="normal">Some text</Tag>
<Tag weight="semibold">Some text</Tag>
<Tag weight="bold">Some text</Tag>
Some text
Some text
Some text
Some text



Shapes

Examples:

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



Colors

Examples:

<Tag color="red">Red</Tag>
<Tag color="green">Green</Tag>
<Tag color="grey">Grey</Tag>
<Tag color="white">White</Tag>
Red
Green
Grey
White



With icon

Examples:

<Tag>Text</Tag>
<Tag icon="icon-blick">Text</Tag>
Text
Text



With action

Examples:

<Tag color="green" onClick={() => alert('Good job!')}>Click me</Tag>
<Tag color="red" onClick={() => alert('Good job!')}>And me</Tag>
Click me
And me