Tag

Tag

import Tag from "@kiwicom/orbit-components/lib/Tag";
<Tag>Hello!</Tag>

Props

NameTypeDefaultDescription
childrenReact.NodeThe content of the Tag.
dataTeststringOptional prop for testing purposes.
iconLeftReact.NodeThe displayed icon on the left.
idstringSet id for Tag.
dateTagstringOptional prop, if it’s true, selected color has a different background.
typeenumneutralThe color type of the Tag.
onClick() => void \| PromiseFunction for handling the onClick event.
onRemove() => void \| PromiseFunction for handling the onClick event of the close icon. See Functional specs
selectedbooleanfalseIf true, the Tag will have selected styles.
sizeenumsmallSize of the Tag.
reffuncProp for forwarded ref of the Tag.

enum

sizetype
"small""neutral"
"normal""colored"

Functional specs

  • By passing the onRemove the close icon will appear on the right side of the Tag.