Skip to main content
Version: 1.0.3

Badge

Overview

Badges are small status descriptors that can be used to highlight specific information, such as notification counts, status indicators, or labels. They can include text, numbers, or just a dot indicator.

Preview

3
Notifications
99+

Installation

ignix add component badge

Usage

Import the component:

import { Badge } from '@ignix-ui/badge';

Basic Usage

function BasicBadge() {
return (
<div className="relative inline-flex items-center">
<Badge mode="attached" text="3" type="primary" variant="pulse">
<Mail className="h-11 w-11" />
</Badge>
</div>
);
}

Props

PropTypeDefaultDescription
textstringContent displayed inside the badge (number or label)
type"primary" | "secondary" | "success" | "warning" | "error""primary"Visual style of the badge
variant"pulse" | "bounce" | "tinypop""tinypop"Animation style applied to the badge
mode"inline" | "attached""inline"When inline is used, Badge is rendered in normal layout flow (used with text, labels). When attached is used, Badge is positioned relative to its child (used with icons, buttons, avatars)
childrenReact.ReactNodeElement to attach the badge to (required for attached mode)
classNamestringAdditional custom styles