Your ImageYour Image
  • About
  • Components
  • About
  • Components
  • Pricing
  • Contact
Book an Intro call
logo

I create digital experiences that connect and inspire. I build apps, websites, brands, and products end-to-end.

  • About
  • Components
  • Pricing
  • Blogs
  • Showcase
  • Contact
  • Privacy
  • Terms
  • Cookie
© 2025Made with by Ali Imam

  • Accordion
  • Alert Dialog
  • Alert
  • Aspect Ratio
  • Avatar
  • Badge
  • Breadcrumb
  • Button
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Collapsible
  • Combobox
  • Command
  • Data Table
  • Date Picker
  • Dialog
  • Drawer
  • Dropdown Menu
  • Input
  • Label
  • Navigation Menu
  • Pagination
  • Popover
  • Progress
  • Radio Group
  • Scroll-area
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Skeleton
  • Slider
  • Sonner
  • Switch
  • Table
  • Tabs
  • Textarea
  • Toggle Group
  • Toggle
  • Tooltip
  • Typography

Badge

PreviousNext

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

Component badge-demo not found in registry.

Installation

pnpm dlx shadcn@latest add badge

Usage

import { Badge } from "@/components/ui/badge"
<Badge variant="default |outline | secondary | destructive">Badge</Badge>

Link

You can use the asChild prop to make another component look like a badge. Here's an example of a link that looks like a badge.

import { Link } from "next/link"
 
import { Badge } from "@/components/ui/badge"
 
export function LinkAsBadge() {
  return (
    <Badge asChild>
      <Link href="/">Badge</Link>
    </Badge>
  )
}
AvatarBreadcrumb

On This Page

InstallationUsageLink