Skip to main content

Tag

An actionable label that changes which content is displayed; can be either an a or a button depending on which is semantically correct.

Polymorphic Component

By default, content is rendered inside an <a>, but this can be overriden by passing any valid tag name or component with the as prop.

Examples​

Basic Tag​

<Tag
href="#"
size="medium(default)|large"
>
A tag
</Tag>

Button Tag​

<Tag
onClick={handleClick}
>
A tag
</Tag>

White Tag​

<Tag
color="white"
>
A tag
</Tag>

Disabled Tag​

<Tag
...
disabled
>
A tag
</Tag>

Props​

NameTypeDefault ValueRequiredDescription
disabledbooleanfalseNoShould the tag be disabled?
size"medium" | "large" | TagSizeTagSize.MediumNoThe size of the tag.