Skip to content
synccn

Badge

Small status label with an optional dot.

DefaultSecondaryOutlineSoftDeployedBuildingFailed

Playground

Change the props and copy the code. The controls come from the component's TypeScript types.

Deployed

Props

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

Installation

$ pnpm dlx shadcn@latest add @synccn/badge

First time in this project? Connect synccn with one command.

Usage

import { Badge } from "@/components/ui/badge";<Badge variant="success" dot>Deployed</Badge>

API reference

Generated from the component's TypeScript types, so it always matches the code.

  • variant
    "default" | "secondary" | "outline" | "soft" | "success" | "warning" | "destructive"

    Default "default"

    Colour style.

  • dot
    boolean

    Default false

    Shows a small dot before the label.

  • className
    string

    Extra classes for the root element.

  • children
    React.ReactNode

    Content to render.

Also accepts every standard <span> attribute, and forwards its ref.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

No ARIA roles, key handling or motion settings in its source. It renders plain elements, so its accessibility comes from the content and labels you give it.