Skip to content
Nana UI

Badge

View .md Download

A small status indicator label with clean, modern design.

New
Terminal window
npm install @nana-tec/ui-components
import "@nana-tec/ui-components/badge";
<nana-badge variant="primary">New</nana-badge>
Primary Success Warning Danger Info Neutral

Properties

PropertyAttributeTypeDefaultDescription
capsulebooleanfalseCapsule shape instead of fully rounded
dotbooleanfalseShow a dot indicator before the text
interactivebooleanfalseMakes badge interactive with hover/focus states
outlinebooleanfalseOutline style with transparent background
pulsebooleanfalsePulse animation for the dot (only when dot is true)
removablebooleanfalseRemovable badge with close button
sizeBadgeSize'md'Size of the badge
variantBadgeVariant'neutral'Visual style variant

Events

EventDescription
remove

Slots

SlotDescription
(default)Badge text content

CSS custom properties

PropertyDescription
--nana-badge-bgCustom background color
--nana-badge-colorCustom text color
--nana-badge-borderCustom border color
EventTypeDescription
removeCustomEvent
SlotDescription
(default)Badge text content
VariableDefaultDescription
--nana-badge-bgCustom background color
--nana-badge-colorCustom text color
--nana-badge-borderCustom border color
PartDescription
badgeThe badge label
remove-buttonThe remove button (when removable)
Explore Badge interactively Every state, prop, and edge case — with live controls — in Storybook.
View in Storybook