BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/boldkit/badge

Badge

boldkit/badge
FreeComponent

Displays a badge or a component that looks like a badge with neubrutalism styling

Live preview

live · rendered by the registry
Rendered by boldkit on their own page — this is the component running, not a screenshot of it.

Install it

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

Source

registry/default/ui/badge.tsxboldkit.dev/r/badge.json
1/* eslint-disable react-refresh/only-export-components */
2import * as React from 'react'
3import { cva, type VariantProps } from 'class-variance-authority'
4import { cn } from '@/lib/utils'
5
6const badgeVariants = cva(
7 'inline-flex items-center border-2 border-foreground px-2.5 py-0.5 text-xs font-bold uppercase tracking-wide transition duration-200 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 shadow-[4px_4px_0px_hsl(var(--shadow-color))] hover:translate-x-[4px] hover:translate-y-[4px] hover:shadow-none',
8 {
9 variants: {
10 variant: {
11 default: 'bg-primary text-primary-foreground',
12 secondary: 'bg-secondary text-secondary-foreground',
13 accent: 'bg-accent text-accent-foreground',
14 destructive: 'bg-destructive text-destructive-foreground',
15 success: 'bg-success text-success-foreground',
16 warning: 'bg-warning text-warning-foreground',
17 info: 'bg-info text-info-foreground',
18 outline: 'bg-background text-foreground',
19 },
20 },
21 defaultVariants: {
22 variant: 'default',
23 },
24 }
25)
26
27export interface BadgeProps
28 extends React.HTMLAttributes<HTMLSpanElement>,
29 VariantProps<typeof badgeVariants> {}
30
31function Badge({ className, variant, ...props }: BadgeProps) {
32 return (
33 <span
34 className={cn(badgeVariants({ variant }), className)}
35 {...props}
36 />
37 )
38}
39
40export { Badge, badgeVariants }

What it pulls in

npm packages

  • class-variance-authority

Other registry items

  • @boldkit/utils

Files it writes

  • registry/default/ui/badge.tsx

Facts

Registry
boldkit
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-03
Last confirmed
today

Go to the source

Docs on boldkit boldkit.dev ANIBIT14/boldkit on GitHub Raw registry item This item as JSON

More from boldkit

All 94 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionboldkitComponentsFree2 deps
AlertalertboldkitComponentsFree2 deps
Alert Dialogalert-dialogboldkitComponentsFree1 dep
ASCII Shapesascii-shapesboldkitComponentsFreeno deps
Aspect Ratioaspect-ratioboldkitComponentsFree1 dep
AvataravatarboldkitComponentsFree1 dep
BreadcrumbbreadcrumbboldkitComponentsFree2 deps
ButtonbuttonboldkitComponentsFree2 deps
BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex