Live code
Storybook
Usage
Tag
import { Tag } from '@lmc-eu/spirit-web-react';
<Tag color="neutral">Tag</Tag>
<Tag color="success">Tag</Tag>
<Tag color="informative">Tag</Tag>
<Tag color="warning">Tag</Tag>
<Tag color="danger">Tag</Tag>
API
Name | Type | Default | Required | Description |
---|---|---|---|---|
children | ReactNode | — | ✔ | Content of the Tag |
color | Emotion Color dictionary, neutral | neutral | ✕ | Color of the component |
elementType | React.Element | span | ✕ | HTML tag |
isSubtle | bool | false | ✕ | If is Subtle color variant used |
ref | ForwardedRef<HTMLSpanElement> | — | ✕ | Tag element reference |
size | Size Extended dictionary | medium | ✕ | Size of the Tag |
On top of the API options, the components accept additional attributes. If you need more control over the styling of a component, you can use style props and escape hatches.
For detailed information see Tag component