Skip to content
Pixelbits
Docs / Badge
Core

Badge

A short, non-interactive label for status or metadata. Text is set in the mono face.

DefaultNewLiveBetaDeprecatedv1.0

Installation

npm: import
import { Badge } from "pixelbits/badge";
shadcn: copy the source
npx shadcn add https://pixelbits.ali-moradi-develop.com/r/badge.json

API

<Badge>

A short, non-interactive label for status or metadata. Text is set in the mono face.

Example
<Badge variant="success" dot>Live</Badge>
<Badge variant="solid">v1.0</Badge>
PropTypeDefaultDescription
variant"neutral" | "accent" | "success" | "warning" | "danger" | "info" | "solid""neutral"

Color and meaning.

  • "neutral": outlined, muted.
  • "accent": the current accent, for "New" and highlights.
  • "success" | "warning" | "danger" | "info": status colors.
  • "solid": inverted, for versions and counts.
dotbooleanfalse

Shows a small square before the text, like a status light.

Also accepts every prop of HTMLAttributes<HTMLSpanElement>.