Skip to content
Byos
ComponentsDocs
XFigma3.4k
Overview
  • Introduction
  • Get Started
  • Styling
  • Registry
  • Roadmap
Components
  • Alert
  • Autocomplete
  • Badge
  • Cascader
  • Code Block
  • Data GridVirtualization and row pinning support added
  • Date Selector
  • Event Calendar
  • File Upload
  • Filters
  • Frame
  • Gantt
  • Icon Stack
  • Icon Tile
  • Kanban
  • Number Field
  • Phone Input
  • Rating
  • Scrollspy
  • Sortable
  • Stepper
  • Timeline
  • Tree

Product

  • Components
  • Docs

Community

  • GitHub
  • X / Twitter
  • Figma

© 2026 Byos. Released under the MIT License.

3.4k

Shadcn Badge

PreviousNext

Custom Shadcn Badge for React and Tailwind CSS. Badges are used to highlight items, notify users, or display statuses.

Base UIRadix UI
Radix UI

Installation

pnpm dlx shadcn@latest add @byosui/r-badge

Usage

import { Badge } from "@/components/byosui/r-badge"
<Badge>Badge</Badge>

Examples

More Shadcn Badge Components

Browse 25 production-ready Shadcn Badge components for dashboards, forms, and product UI. These examples follow the Radix UI implementation with accessible primitives from the Radix stack and stay fully compatible with Shadcn Create so radius, color, and typography match your configured theme.

Browse all 25 Shadcn Badge components for copy-ready layouts, dashboards, and forms built with Tailwind CSS in the ReUI library.

AutocompleteCascader

On This Page

InstallationUsageExamplesSecondaryDestructiveSuccessInfoWarningOutlinePrimary OutlineDestructive OutlineInfo OutlineSuccess OutlineWarning OutlinePrimary LightDestructive LightSuccess LightInfo LightWarning LightInvert LightSizeFull RadiusWith IconWith Icon ButtonWith DotWith LinkAPI ReferenceProps

Secondary

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="secondary">Badge</Badge>
}

Destructive

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="destructive">Badge</Badge>
}

Success

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="success">Badge</Badge>
}

Info

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="info">Badge</Badge>
}

Warning

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="warning">Badge</Badge>
}

Outline

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="outline">Badge</Badge>
}

Primary Outline

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="primary-outline">Badge</Badge>
}

Destructive Outline

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="destructive-outline">Badge</Badge>
}

Info Outline

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="info-outline">Badge</Badge>
}

Success Outline

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="success-outline">Badge</Badge>
}

Warning Outline

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="warning-outline">Badge</Badge>
}

Primary Light

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="primary-light">Badge</Badge>
}

Destructive Light

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="destructive-light">Badge</Badge>
}

Success Light

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="success-light">Badge</Badge>
}

Info Light

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="info-light">Badge</Badge>
}

Warning Light

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="warning-light">Badge</Badge>
}

Invert Light

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge variant="warning-light">Badge</Badge>
}

Size

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return (
    <div className="flex items-center gap-2.5">
      <Badge size="sm">Small</Badge>
      <Badge size="default">Default</Badge>
      <Badge size="lg">Large</Badge>
    </div>
  )
}

Full Radius

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return (
    <div className="flex flex-col items-center justify-center gap-6">
      <div className="flex items-center gap-2.5">
        <Badge size="sm" radius="full">
          3
        </Badge>
        <Badge size="default" radius="full">
          3
        </Badge>
        <Badge size="lg" radius="full">
          3
        </Badge>
      </div>
      <div className="flex items-center gap-2.5">
        <Badge size="sm" radius="full">
          New
        </Badge>
        <Badge radius="full">New</Badge>
        <Badge size="lg" radius="full">
          New
        </Badge>
      </div>
      <div className="flex items-center gap-2.5">
        <Badge size="sm" radius="full" variant="outline">
          New
        </Badge>
        <Badge radius="full" variant="secondary">
          New
        </Badge>
        <Badge size="lg" radius="full" variant="success-light">
          New
        </Badge>
      </div>
    </div>
  )
}

With Icon

import { Badge } from "@/components/byosui/badge"
import { CheckIcon } from 'lucide-react'

export function Pattern() {
  return (
    <Badge variant="outline">
      <CheckIcon />
      Badge
    </Badge>
  )
}

With Icon Button

import { Badge } from "@/components/byosui/badge"

import { Button } from "@/components/ui/button"
import { XIcon } from 'lucide-react'

export function Pattern() {
  return (
    <Badge variant="outline" className="gap-0.5">
      Badge
      <Button
        variant="ghost"
        size="icon"
        className="size-3 hover:bg-transparent"
      >
        <XIcon />
      </Button>
    </Badge>
  )
}

With Dot

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return (
    <Badge variant="info-light">
      <span className="ms-0.25 size-1.25 rounded-full! bg-[currentColor]" />{" "}
      Badge
    </Badge>
  )
}

With Link

import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return (
    <Badge variant="outline" asChild>
      <a href="#">Badge</a>
    </Badge>
  )
}

API Reference

This component follows the same API design as the Badge Component from shadcn/ui. The key difference is that it uses extended color tokens such as --success, --info, --warning and --invert for badge variants instead of utility classes.

This approach enables consistent, reusable state variants across the project without relying on custom Tailwind color utilities.

<Badge variant="success-light" size="sm">
  Success
</Badge>
<Badge variant="outline" radius="full">
  Pill
</Badge>

Props

PropType
variant"default" | "secondary" | "destructive" | "outline" | "info" | "success" | "warning" | "invert"
variant (Outline)"primary-outline" | "warning-outline" | "success-outline" | "info-outline" | "destructive-outline" | "invert-outline"
variant (Light)"primary-light" | "warning-light" | "success-light" | "info-light" | "destructive-light" | "invert-light"
size"default" | "xs" | "sm" | "lg" | "xl"
radius"default" (active style radius) | "full" (rounded-full)
import { Badge } from "@/components/byosui/badge"

export function Pattern() {
  return <Badge>Badge</Badge>
}