Badge

Small, inline status descriptors used to label, categorize, or indicate the state of UI elements. Supports semantic color variants, optional icons, and dismissible behavior.

Import

import { Badge } from '@wavebooking/aqua-fusion';

Preview

Loading preview...

Usage

<Badge variant="success">Active</Badge>

With icon

<Badge variant="warning" showIcon>
  Pending
</Badge>

Dismissible

<Badge variant="info" dismissible onDismiss={() => console.log('dismissed')}>
  New
</Badge>

Custom icon

import { Icon } from '@wavebooking/aqua-fusion';

<Badge variant="primary" icon={<Icon name="StarIcon" size="xs" />} showIcon>
  Featured
</Badge>

Props

PropTypeDefaultDescription
children*React.ReactNode-The badge label content.
variant'default' | 'primary' | 'success' | 'warning' | 'error' | 'info' | 'purple' | 'indigo' | 'pink' | 'orange' | 'amber''default'Semantic color variant of the badge.
size'xs' | 'sm' | 'md' | 'lg''sm'Size of the badge.
iconReact.ReactNode-Custom icon element. When omitted, a default icon matching the variant is used.
showIconbooleanfalseWhether to display the icon alongside the label.
dismissiblebooleanfalseWhether the badge shows a dismiss button.
onDismiss() => void-Callback fired when the dismiss button is clicked.
animatebooleanfalseEnable enter/exit animations via Framer Motion.
classNamestring-Additional CSS classes.