Vvcare/ui
Documentation menu

Components

Getting Started

Installation

Point your project at the registry, then add components one at a time.

Requirements

  • A React project: Astro with @astrojs/react, Vite, Next.js or similar.
  • Tailwind CSS v4.
  • A path alias such as @/* in tsconfig.json, and in your bundler config if it needs its own.
  • Node 20 or newer to run the CLI.

1. Configure components.json

The CLI reads components.json to learn where files go and how to rewrite imports. Create it by running init, or write it by hand. The important part for vcare/ui is the registries entry, which registers the @vcare namespace.

components.json
{
  "$schema": "https://ui.shadcn.com/schema.json",
  "style": "new-york",
  "rsc": false,
  "tsx": true,
  "tailwind": {
    "config": "",
    "css": "src/styles/global.css",
    "baseColor": "neutral",
    "cssVariables": true
  },
  "aliases": {
    "components": "@/components",
    "utils": "@/lib/utils",
    "ui": "@/components/ui",
    "lib": "@/lib",
    "hooks": "@/hooks"
  },
  "registries": {
    "@vcare": "https://ui.vcarehms.com/r/{name}.json"
  }
}

You can also register the namespace from the command line:

npx shadcn@latest registry add @vcare=https://ui.vcarehms.com/r/{name}.json

The {name} placeholder is replaced with the item name, so @vcare/button fetches https://ui.vcarehms.com/r/button.json.

2. Add the theme

The theme writes styles/vcare.css: every token, the Tailwind mappings (bg-primary, h-control, shadow-raised…), light and dark, accents and density. Import it after Tailwind; Theming has the fonts and attributes.

npx shadcn@latest add @vcare/vcare-theme
src/styles/global.css
@import "tailwindcss";
@import "@fontsource/google-sans/400.css";
@import "@fontsource/google-sans/600.css";
@import "@fontsource-variable/geist";
@import "./vcare.css";

/* Let Tailwind see the classes in your components folder. */
@source "../components";

3. Add components

npx shadcn@latest add @vcare/button @vcare/card

Dependencies are resolved for you. Adding button also installs utils, render-compat, class-variance-authority and radix-ui. The files appear at src/components/ui/.

Or skip the namespace entirely and install from a URL:

npx shadcn@latest https://ui.vcarehms.com/r/button.json

4. Use them

import { Button } from "@/components/ui/button"

export function Example() {
  return <Button variant="outline">Hello vcare</Button>
}

In Astro, add client:load or client:visible to interactive components. Purely presentational ones such as Card and Badge render fine as static HTML.

Dark mode

Set data-mode="dark" and the dark class on <html>, or let ThemeProvider do it. See theming.