Start here
  • InstallationAdd Nelumbo to a shadcn project
  • ThemingBrand accent, neutrals, dynamic color
  • Biology componentsSequences, maps, plates and trees
  • katalyx.bio

    Badge

    Two kinds. Badge labels a status or category next to content. NotificationBadge sits on the corner of an icon or avatar to say something new is waiting.

    Install

    npx shadcn@latest add @nelumbo/badge

    Badge

    Black and white for neutral labels; tonal palette colors when the badge carries meaning. shadcn's default, secondary, outline and destructive work as is.

    DefaultSecondaryOutlineBrandSuccessWarningDestructiveInfo

    Dots and icons

    dot adds a status dot in the badge's accent; icon adds a leading Material Symbol. size="sm" is 20px, for table rows and dense lists.

    LiveDegradedOutageDraftNewDue FridayPrivatePaidv2.4.0design-system

    In a heading

    Next to a title, the badge lines up with the text.

    Spring campaign

    Live
    BillingPro

    NotificationBadge

    A dot for something new, or a count that caps at max (999+ by default). It springs in and out. placement says what it sits on: a bare icon, an icon button, or an avatar. Screen readers don't see it, so put the count in the control's name.

    dot
    count
    max
    icon button
    icon button, dot
    avatar
    avatar, dot

    Usage

    import { Badge, NotificationBadge } from "@/components/ui/badge"​<Badge>New</Badge><Badge variant="success" dot>Live</Badge><Badge variant="secondary" icon="schedule" size="sm">Due Friday</Badge>​<NotificationBadge count={unread} placement="button">  <IconButton icon="notifications" label={`Notifications, ${unread} new`} /></NotificationBadge>

    Props

    PropTypeDefaultNotes
    Badge variant"default" | "secondary" | "outline" | "brand" | "success" | "warning" | "destructive" | "info""default"
    Badge size"default" | "sm""default"24px or 20px
    Badge dotbooleanfalseLeading status dot
    Badge iconIconNameLeading Material Symbol
    Badge asChildbooleanfalseRender as your link
    NotificationBadge countnumberLeave out for a dot; 0 hides it
    NotificationBadge maxnumber999Above it, shows "999+"
    NotificationBadge placement"icon" | "button" | "avatar""icon"What it sits on
    NotificationBadge invisiblebooleanfalseHide it (it springs away)