BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/adn-ui/badge

Badge

adn-ui/badge
FreeComponent

Displays a badge or a component that looks like a badge.

Live preview

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

Install it

npx shadcn@latest add https://ui.awaiden.com/r/badge.json

Source

src/components/ui/badge/badge.tsxui.awaiden.com/r/badge.json
1"use client";
2
3import "./badge.css";
4import type React from "react";
5import { cn } from "tailwind-variants";
6
7import { BadgeContext } from "./badge.context";
8import { badgeVariants, type BadgeVariants } from "./badge.variants";
9
10export type BadgeProps = BadgeVariants & React.HTMLAttributes<HTMLDivElement>;
11
12export const BadgeRoot = ({ children, className, variant, size, ...props }: BadgeProps) => {
13 const slots = badgeVariants({ variant, size });
14
15 return (
16 <BadgeContext.Provider value={{ slots }}>
17 <div className={cn(slots.root(), className)} {...props}>
18 {children}
19 </div>
20 </BadgeContext.Provider>
21 );
22};
23
24export const Badge = BadgeRoot;

What it pulls in

npm packages

  • tailwind-variants

Files it writes

  • src/components/ui/badge/badge.tsx
  • src/components/ui/badge/badge.variants.ts
  • src/components/ui/badge/badge.context.ts
  • src/components/ui/badge/badge.css
  • src/components/ui/badge/index.ts

Facts

Registry
adn-ui
Type
registry:ui
Access
Free
Files written
5
Licence
MIT
First indexed
2026-08-04
Last confirmed
today

Go to the source

Docs on adn-ui ui.awaiden.com awaiden/adn-ui on GitHub Raw registry item This item as JSON

More from adn-ui

All 46 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Accordionaccordionadn-uiComponentsFree2 deps · 5 files
Alert Dialogalert-dialogadn-uiComponentsFree2 deps · 5 files
Aspect Ratioaspect-ratioadn-uiComponentsFree1 dep · 5 files
Autocompleteautocompleteadn-uiComponentsFree2 deps · 5 files
Avataravataradn-uiComponentsFree2 deps · 5 files
Breadcrumbbreadcrumbadn-uiComponentsFree1 dep · 5 files
Buttonbuttonadn-uiComponentsFree1 dep · 4 files
Button Groupbutton-groupadn-uiComponentsFree1 dep · 5 files
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