Skip to content
Nana UI

Tag

A compact label for categories, keywords, or filters. Optionally removable.

Design
Terminal window
npm install @nana-tec/ui-components
import "@nana-tec/ui-components/tag";
<nana-tag variant="primary">Design</nana-tag>
Primary Success Warning Danger Info Neutral
PropertyTypeDefaultDescription
variant'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral''neutral'Visual colour variant.
size'sm' | 'md' | 'lg''md'Tag size.
shape'rounded' | 'pill' | 'square''rounded'Corner shape.
outlinebooleanfalseOutline style with a transparent fill.
removablebooleanfalseShow a remove button.
disabledbooleanfalseDisable the tag and its remove button.
EventTypeDescription
nana-removeCustomEventEmitted when the remove button is activated.
SlotDescription
(default)The tag’s text content.
VariableDefaultDescription
--nana-tag-bgBackground colour.
--nana-tag-colorText colour.
--nana-tag-borderBorder colour.
PartDescription
baseThe component’s host container
contentThe text content wrapper
remove-buttonThe remove button (when removable)
Explore Tag interactively Every state, prop, and edge case — with live controls — in Storybook.
View in Storybook