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
Money
An amount in minor units, formatted in the currency setting.
import { Money } from "@/registry/vcare/ui/money"
import { SystemProvider } from "@/registry/vcare/lib/system"
export default function MoneyDemo() {
return (
<div className="grid gap-2 text-lg">
<Money minor={125000} />
<SystemProvider settings={{ locale: "en-US", currency: "USD" }}>
<Money minor={125000} />
</SystemProvider>
<Money minor={null} />
</div>
)
}Installation
npx shadcn@latest add @vcare/moneyOr install directly from the URL: https://ui.vcarehms.com/r/money.json
- Add the registry items it uses: system, utils.
- Copy this file into your project and change the
@/registry/vcare/…imports to your own paths.
components/ui/money.tsx
import { useFormat } from '@/registry/vcare/lib/system';
import { cn } from '@/registry/vcare/lib/utils';
/** Money from minor units, formatted with the clinic currency settings. */
export function Money({ minor, className }: { minor: number | null | undefined; className?: string }) {
const fmt = useFormat();
return (
<span dir="ltr" className={cn('tabular-nums', className)}>
{minor === null || minor === undefined ? '—' : fmt.currencyMinor(minor)}
</span>
);
}Usage
import { Money } from "@/components/ui/money"Exports
Money
Dependencies
@vcare/system(registry)@vcare/utils(registry)
Raw item: /r/money.json