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
Registry
Deploy to Cloudflare
The whole site, registry included, is static files. Cloudflare Pages serves it for free.
Why it fits
The build produces a dist/ folder of HTML, JS and JSON. There is no server code and no database, so Pages needs no adapter and no Worker.
Option A: connect a Git repository
- In the Cloudflare dashboard open Workers & Pages, then Create, then Pages, then connect your repo.
- Framework preset: Astro. Build command:
npm run build. Output directory:dist. - Add an environment variable
PUBLIC_SITE_URLset to your final URL, for examplehttps://ui.vcarehms.comor your custom domain. - Deploy. Every push to the production branch redeploys, and other branches get preview URLs.
Why PUBLIC_SITE_URL matters
http://localhost:5190.
Option B: deploy from your terminal
This repo includes a wrangler.jsonc and a deploy script.
npx wrangler login
PUBLIC_SITE_URL=https://ui.vcarehms.com npm run deployThe script builds the registry and the site, then runs wrangler pages deploy dist.
CORS and headers
The CLI fetches JSON from Node, so CORS is not required for it. It is required if a browser app, such as an in-browser playground, fetches your items. public/_headers is copied into dist and Cloudflare applies it:
/r/*
Access-Control-Allow-Origin: *
Content-Type: application/json
Cache-Control: public, max-age=300A five minute cache keeps installs fast while letting fixes roll out quickly. Raise it once your registry stabilises.
Custom domain
In the Pages project open Custom domains and add one, for instance ui.example.com. Update PUBLIC_SITE_URL, rebuild, and consumers change their namespace to the new template. Items reference each other by namespace, so nothing inside the JSON has to change.
Verify
curl -sI https://ui.vcarehms.com/r/button.json | grep -i -E "http|content-type|access-control"
npx shadcn@latest view https://ui.vcarehms.com/r/button.jsonYou should see a 200, application/json, and the resolved item with its file contents.