Badge
agileflow-projectquestorg/badge-exampleFreeExample
shadcn/ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/projectquestorg/AgileFlow/main/apps/docs/public/r/styles/radix-nova/badge-example.jsonSource
1import {2 Example,3 ExampleWrapper,4} from "@/registry/bases/radix/components/example"5import { Badge } from "@/registry/bases/radix/ui/badge"6import { Spinner } from "@/registry/bases/radix/ui/spinner"7import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"89export default function BadgeExample() {10 return (11 <ExampleWrapper className="lg:grid-cols-1">12 <BadgeVariants />13 <BadgeWithIconLeft />14 <BadgeWithIconRight />15 <BadgeWithSpinner />16 <BadgeAsLink />17 <BadgeLongText />18 <BadgeCustomColors />19 </ExampleWrapper>20 )21}2223function BadgeVariants() {24 return (25 <Example title="Variants">26 <div className="flex flex-wrap gap-2">27 <Badge>Default</Badge>28 <Badge variant="secondary">Secondary</Badge>29 <Badge variant="destructive">Destructive</Badge>30 <Badge variant="outline">Outline</Badge>31 <Badge variant="ghost">Ghost</Badge>32 <Badge variant="link">Link</Badge>33 </div>34 </Example>35 )36}3738function BadgeWithIconLeft() {39 return (40 <Example title="Icon Left" className="max-w-fit">41 <div className="flex flex-wrap gap-2">42 <Badge>43 <IconPlaceholder44 lucide="BadgeCheck"45 tabler="IconRosetteDiscountCheck"46 hugeicons="CheckmarkBadge02Icon"47 phosphor="CheckCircleIcon"48 data-icon="inline-start"49 />50 Default51 </Badge>52 <Badge variant="secondary">53 <IconPlaceholder54 lucide="BadgeCheck"55 tabler="IconRosetteDiscountCheck"56 hugeicons="CheckmarkBadge02Icon"57 phosphor="CheckCircleIcon"58 data-icon="inline-start"59 />60 Secondary61 </Badge>62 <Badge variant="destructive">63 <IconPlaceholder64 lucide="BadgeCheck"65 tabler="IconRosetteDiscountCheck"66 hugeicons="CheckmarkBadge02Icon"67 phosphor="CheckCircleIcon"68 data-icon="inline-start"69 />70 Destructive71 </Badge>72 <Badge variant="outline">73 <IconPlaceholder74 lucide="BadgeCheck"75 tabler="IconRosetteDiscountCheck"76 hugeicons="CheckmarkBadge02Icon"77 phosphor="CheckCircleIcon"78 data-icon="inline-start"79 />80 Outline81 </Badge>82 <Badge variant="ghost">83 <IconPlaceholder84 lucide="BadgeCheck"85// … truncated
What it pulls in
Other registry items
Files it writes
More from shadcn/ui
All 133 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion-example | shadcn/ui | Examples | Free | no deps | |
| Alert Dialogalert-dialog-example | shadcn/ui | Examples | Free | no deps | |
| Alertalert-example | shadcn/ui | Examples | Free | no deps | |
| Aspect Ratioaspect-ratio-example | shadcn/ui | Examples | Free | no deps | |
| Avataravatar-example | shadcn/ui | Examples | Free | no deps | |
| Breadcrumbbreadcrumb-example | shadcn/ui | Examples | Free | no deps | |
| Buttonbutton-example | shadcn/ui | Examples | Free | no deps | |
| Button Groupbutton-group-example | shadcn/ui | Examples | Free | no deps |
