Tag
freeTag labels content with a compact keyword, category, or status marker.
LabelLabel
Installation
Add this component with the NateUI CLI.
Examples
Basic
DraftDesignEngineeringResearch
Sizes
SmallMediumLarge
Affix
Default dotCustom dotPrefix iconSuffix icon
Status
ActiveDraftPendingFailed
Colors
EmeraldRoseBlueCyanOrangeRedPurpleYellow
Removable
In stockFree shippingUnder $50On sale
API
Tag renders a span and accepts the props below plus native props for that element.
| Prop | Description | Type | Default |
|---|---|---|---|
children | Content shown inside the tag. | ReactNode | - |
size | Controls padding and text size. | ControlSize | 'md' |
prefix | Content before the label. Pass true for a colored dot, or a node to render it directly. | boolean | ReactNode | false |
prefixClass | Extra classes for the prefix dot. Applies only when prefix is true. | string | - |
suffix | Content after the label. Pass true for a colored dot, or a node to render it directly. | boolean | ReactNode | false |
suffixClass | Extra classes for the suffix dot. Applies only when suffix is true. | string | - |
className | Extra classes for the root span. | string | - |
ref | Ref forwarded to the root span. | Ref<HTMLSpanElement> | - |
...nativeSpanProps | Native props for the root span. | NativeTagSpanProps | - |