BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/acme/badge

badge

nrjdalal/badge
FreeComponent

acme publishes no description for this item.

Install it

npx shadcn@latest add https://nrjdalal.dev/r/badge.json

Source

src/components/ui/badge.tsxnrjdalal.dev/r/badge.json
1import { cn } from "@/lib/utils"
2import { Slot } from "@radix-ui/react-slot"
3import { cva, type VariantProps } from "class-variance-authority"
4import * as React from "react"
5
6const badgeVariants = cva(
7 "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-auto",
8 {
9 variants: {
10 variant: {
11 default:
12 "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
13 secondary:
14 "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
15 destructive:
16 "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
17 outline:
18 "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
19 },
20 },
21 defaultVariants: {
22 variant: "default",
23 },
24 },
25)
26
27function Badge({
28 className,
29 variant,
30 asChild = false,
31 ...props
32}: React.ComponentProps<"span"> &
33 VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
34 const Comp = asChild ? Slot : "span"
35
36 return (
37 <Comp
38 data-slot="badge"
39 className={cn(badgeVariants({ variant }), className)}
40 {...props}
41 />
42 )
43}
44
45export { Badge, badgeVariants }

What it pulls in

npm packages

  • @radix-ui/react-slot
  • class-variance-authority
  • clsx
  • react
  • tailwind-merge

Files it writes

  • src/components/ui/badge.tsx
  • src/lib/utils.ts

Facts

Registry
acme
Type
registry:ui
Access
Free
Files written
2
Licence
the repository states none
In the index
at or before 2026-08-13
Last confirmed
yesterday

Go to the source

nrjdalal.dev nrjdalal/nrjdalal.com on GitHub Raw registry item This item as JSON

More from acme

All 49 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionacmeComponentsFree5 deps · 2 files
alertalertacmeComponentsFree4 deps · 2 files
alert-dialogalert-dialogacmeComponentsFree6 deps · 3 files
aspect-ratioaspect-ratioacmeComponentsFree1 dep
avataravataracmeComponentsFree4 deps · 2 files
breadcrumbbreadcrumbacmeComponentsFree5 deps · 2 files
buttonbuttonacmeComponentsFree5 deps · 2 files
calendarcalendaracmeComponentsFree7 deps · 3 files

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex