Components
- Accordion
- Action BarUpdated
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- BadgeUpdated
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- CalendarUpdated
- CardUpdated
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context MenuUpdated
- Data List
- Date Picker
- DialogUpdated
- DrawerUpdated
- Editable
- FieldUpdated
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- MarqueeUpdated
- Menu
- Native Select
- Number InputUpdated
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- TableUpdated
- Tabs
- Textarea
- TimerUpdated
- ToastUpdated
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Hooks
Badge
A badge or an element styled as a badge.
Favorite
Installation#
pnpm dlx shadcn@latest add @shark/badge
Usage#
import { Badge } from "@/components/ui/badge";
<Badge>Favorite</Badge>
Variants#
Default#
Badge
Secondary#
Badge
Outline#
Badge
Success#
Badge
Info#
Badge
Warning#
Badge
Destructive#
Badge
Sizes#
The size prop controls the badge dimensions.
Small#
Badge
Medium#
Badge
Large#
Badge
Pill#
The pill prop creates fully rounded badges.
Badge
Examples#
With link#
The asChild prop renders another element with badge styling.
With icon#
Favorite
With spinner#
DeletingGenerating
Custom color#
IndigoPinkSkyPurple
API Reference#
Badge#
Label, count, or status badge. Supports variants.
| Prop | Type | Default |
|---|---|---|
variant | "default" | "secondary" | "outline" | "success" | "info" | "warning" | "destructive" | "default" |
size | "sm" | "md" | "lg" | "md" |
className | string | - |
asChild | boolean | false |