Documentation menu
Getting Started
Components
Primitives
- Agent Thinking
- Alert
- Alert Dialog
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Checkbox
- Command
- Command Palette
- Context Menu
- Data Table
- Dialog
- Dropdown Menu
- Empty
- Field
- Glow Cloud
- Input
- Label
- Medication Schedule
- Period Tabs
- Popover
- Rainbow Button
- Scroll Area
- Select
- Selectable Card
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Tag
- Textarea
- Timeline
- Tooltip
- Use Count Up
Charts and metrics
Patterns
- Confirm Button
- Date Picker
- Embedded
- Empty State
- Entity Drawer
- Error Boundary
- Field Row
- File Dropzone
- Form Dialog
- Kv
- List Editor
- List Page
- Live Time
- Mini Table
- Money
- Note Field
- Note Text
- Page Card
- Page Header
- Page Tabs
- Page Toolbar
- Person Cell
- Picture Field
- Print Card
- Range Switcher
- Row Actions
- Search Input
- Search Select
- Selected Box
- Signature Pad
- Status Badge
- Sub Nav Layout
- Suggest Input
- Tab Icons
- Table Footer
- Theme Accent Picker
- Time Picker
- View All Link
Dashboard cards
Advanced
Device frames
Website widgets
Website screens
Website panels
Patterns
Status Badge
A status label colored by its tone.
import { StatusBadge } from "@/registry/vcare/ui/status-badge"
export default function StatusBadgeDemo() {
return (
<div className="flex flex-wrap gap-2">
<StatusBadge label="Scheduled" tone="info" />
<StatusBadge label="Checked in" tone="accent" />
<StatusBadge label="Completed" tone="success" />
<StatusBadge label="Late" tone="warning" />
<StatusBadge label="Cancelled" tone="danger" />
<StatusBadge label="Draft" />
</div>
)
}Installation
npx shadcn@latest add @vcare/status-badgeOr install directly from the URL: https://ui.vcarehms.com/r/status-badge.json
- Add the registry items it uses: tag.
- Copy this file into your project and change the
@/registry/vcare/…imports to your own paths.
components/ui/status-badge.tsx
import { Tag, type TagColor } from '@/registry/vcare/ui/tag';
export type Tone = 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'accent';
/** Semantic tone → tag color from the design tokens. */
const TONE_COLOR: Record<Tone, TagColor> = {
neutral: 'neutral',
info: 'blue',
success: 'green',
warning: 'amber',
danger: 'red',
accent: 'purple',
};
/** A status (or priority, gender…) shown with its label and a semantic tone, so the same status looks the same everywhere. */
export function StatusBadge({ label, tone = 'neutral', className }: { label: string; tone?: Tone; className?: string }) {
return (
<Tag color={TONE_COLOR[tone]} className={className}>
{label}
</Tag>
);
}Usage
import { StatusBadge } from "@/components/ui/status-badge"Exports
StatusBadge
Dependencies
@vcare/tag(registry)
Raw item: /r/status-badge.json