Displaysrc/components/ui/badge.tsx

Badge

A compact label for status, metadata, or counts.

Preview

BadgeSecondaryDestructiveOutline
Verified89920+

Installation

Copy the component source into your project with `degit`. This port is intentionally not distributed as an npm package.

bunx degit https://github.com/LiasCode/shadcn-preact/src/components/ui#main ./src/components/ui

Usage

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

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

API Reference

ExportPurpose
BadgeComposable part exported by `@/components/ui/badge`.