Skip to main content

Tag

Examples

Check out the Usage section for details about how to design a tag properly, and the different configuration options we provide.

Basic example

A basic tag is a string with special formatting that designates it as a tag to a reader.

<Tag label="This is a tag"/>

Collapsed text example

There is a character limit on tags. If the text is too long it will be cut off.

<Tag label="This is a tag with a very very very very very very long label"/>

Clickable tag example

You can designate an onClick function for a tag. This function is called when the icon next to the tag text is clicked by a user.

<Tag label="This is a tag" onClick={MakeToast}/>

Clickable tag with custom icon example

You can designate an icon that a user can click to run a function. Note that if there is no onClick prop added, the custom icon will not be shown.

<Tag label="This is a tag" icon={CheckIcon} onClick={MakeToast}/