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
Website panels
Forms Panel
Forms engine: a pain assessment form with a slider, a checkbox and a calculated score.
import Forms from "@/registry/vcare/site/panels/Forms"
export default function SiteFormsPanelDemo() {
// The width of a third-width Departments card.
return (
<div className="vc-site grid place-items-center overflow-x-auto rounded-2xl bg-[#f5f6f8] p-6">
<div className="w-full max-w-[340px]">
<Forms />
</div>
</div>
)
}Installation
npx shadcn@latest add @vcare/site-forms-panelOr install directly from the URL: https://ui.vcarehms.com/r/site-forms-panel.json
- Install the dependencies:
npm i motion react-icons - Add the registry items it uses: site-kit, site-theme.
- Copy this file into your project and change the
@/registry/vcare/…imports to your own paths.
components/site/panels/Forms.tsx
import { motion } from 'motion/react';
import { LuCheck, LuGripVertical } from 'react-icons/lu';
import { Badge, Item, Panel } from '../ui/kit';
export default function Forms() {
return (
<Panel title="Pain assessment" action={<Badge tone="violet">Draft v3</Badge>}>
<div className="space-y-3 p-4">
<Item i={0} className="rounded-xl bg-[#f7f7f9] p-3">
<div className="flex items-center gap-2 text-[12px] font-semibold text-ink"><LuGripVertical size={14} className="text-[#9aa0ad]" />Pain level (0 to 10)</div>
<div className="relative mt-3 h-1.5 rounded-full bg-[#e6e8ed]">
<motion.div className="absolute inset-y-0 left-0 rounded-full bg-primary" initial={{ width: '0%' }} whileInView={{ width: '70%' }} viewport={{ once: true }} transition={{ duration: 1.2, delay: 0.4, ease: [0.25, 1, 0.5, 1] }} />
<motion.div className="absolute -top-1.5 h-4.5 w-4.5 -translate-x-1/2 rounded-full bg-white shadow ring-2 ring-primary" style={{ height: 18, width: 18 }} initial={{ left: '0%' }} whileInView={{ left: '70%' }} viewport={{ once: true }} transition={{ duration: 1.2, delay: 0.4, ease: [0.25, 1, 0.5, 1] }} />
</div>
</Item>
<Item i={1} className="flex items-center gap-3 rounded-xl bg-[#f7f7f9] p-3 text-[12px]">
<LuGripVertical size={14} className="text-[#9aa0ad]" />
<span className="font-semibold text-ink">Worse on movement</span>
<span className="ml-auto grid h-5 w-5 place-items-center rounded bg-primary text-white"><LuCheck size={12} strokeWidth={3} /></span>
</Item>
<Item i={2} className="flex items-center justify-between rounded-xl bg-[#efeaff] p-3">
<div className="text-[12px]"><p className="font-semibold text-[#5b3fd0]">Calculated score</p><p className="text-[11px] text-[#6b5bb0]">Moderate, review in 1 week</p></div>
<span className="text-2xl font-bold text-[#5b3fd0]">7</span>
</Item>
</div>
</Panel>
);
}Usage
import Forms from "@/components/site/panels/Forms"
<Forms />Exports
Forms (default)
Dependencies
motion@^14.14.0(npm)react-icons@^5.7.0(npm)@vcare/site-kit(registry)@vcare/site-theme(registry)
Raw item: /r/site-forms-panel.json