WFP logoDesign System

Displays a badge or a component that looks like a badge.

NewFeaturedPopularDeprecated
Verified123Premium99+

Installation

pnpm dlx shadcn@latest add https://designsystem.wfp.org/r/badge.json

Usage

import { Badge } from "@/components/ui/badge";
<Badge>New</Badge>

Examples

Variants

DefaultSecondaryOutlineDestructiveWarningSuccessGhostLink

With icon

FeaturedVerifiedNotificationsHot

Combine badges with icons to add visual context.

Badges automatically adapt their hover styles when used within anchor tags.

API reference

PropTypeDescription
variant"default" | "secondary" | "outline" | "destructive" | "warning" | "success" | "ghost" | "link"The visual style of the badge
asChildbooleanRender as a child component (uses Radix Slot)