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
Getting Started
Theming
Everything is a CSS variable, switched by three attributes on <html>.
How it works
Components never use raw colors or fixed heights. They use classes such as bg-primary, h-control and shadow-raised, which resolve to CSS variables. The theme sets those variables from three attributes:
<html data-mode="light" data-accent="navy" data-density="compact">- data-mode:
lightordark. Also add thedarkclass in dark mode, fordark:utilities. - data-accent:
navy,teal,slate,neutral,forest,indigoorrose. Each changes the primary color, the charts and the light surfaces. - data-density:
compact(the app's default) orcomfortable. Changes control, row and nav heights.
Try them all on the themes page.
Install
npx shadcn@latest add @vcare/vcare-themeThis writes styles/vcare.css. Import it after Tailwind, and load the fonts (Google Sans, with Geist as fallback):
@import "tailwindcss";
@import "@fontsource/google-sans/400.css";
@import "@fontsource/google-sans/500.css";
@import "@fontsource/google-sans/600.css";
@import "@fontsource/google-sans/700.css";
@import "@fontsource-variable/geist";
@import "./styles/vcare.css";From React
ThemeProvider (in @vcare/theme-provider) sets the attributes for you, remembers the choice and can load a Google font:
import { ThemeProvider, useTheme } from "@/lib/theme-provider"
<ThemeProvider>
<App />
</ThemeProvider>
const { theme, setTheme } = useTheme()
setTheme({ ...theme, accent: "teal", mode: "dark" })Token reference
| Token | Used for |
|---|---|
| --background / foreground | Page background and default text. |
| --card / popover | Surfaces: cards, menus, dialogs. |
| --primary / primary-hover / primary-foreground | Actions and highlights. Follows the accent. |
| --secondary, muted, accent | Quieter surfaces and hover states. |
| --success, warning, danger, destructive | Status colors. |
| --chart-1 … chart-5 | Series colors for every chart. |
| --tag-<color>-bg / -border / -text | The Tag palette (blue, green, amber, red, purple…). |
| --sidebar, nav-active-bg / -fg / -shadow | Sidebar and the active item in any navigation. |
| --control-h, control-h-sm, control-h-lg | Heights of buttons, inputs and selects (h-control). |
| --row-h, head-h, nav-h, header-h, chip-h | Table rows, headers, nav items, page header, chips. |
| --shadow-raised, shadow-border, shadow-overlay | The raised pill and card shadows. |
| --radius | Base corner radius; the scale derives from it. |
Website theme
The marketing sections use the website's own look (Onest, a larger type scale, softer cards). It lives in @vcare/site-theme and only applies inside a .vc-site wrapper, so app screens and marketing pages can share one stylesheet.
<div className="vc-site">
<Hero appUrl="/demo" />
<Departments />
</div>Make your own accent
- Copy one
[data-accent='…']block invcare.cssand give it a new name. - Change
--primary,--primary-hover,--ringand the--chart-*values. - Add the name to
ACCENTSinlib/themes.tsso the pickers offer it.