Skip to main content

Pitfall — ShadCnProvider missing primitives

Error
Root cause
  • The runtime UI relies on host-provided shadcn/ui primitives. If you do not pass a mapping of these components, the provider throws.
Required primitives
  • Input, Textarea, Label, Badge, ScrollArea
  • PopoverRoot, PopoverTrigger, PopoverContent, PopoverAnchor
  • CommandRoot, CommandList, CommandItem, CommandGroup, CommandEmpty, CommandInput, CommandSeparator
Fix
Checklist
  • Install runtime: pnpm add @formlink/runtime
  • Ensure shadcn/ui is installed in your app and exported from a central @/components/ui barrel.
  • Pass the full mapping above to ShadCnProvider components={...}.
  • Import runtime CSS once (root layout): import "@formlink/runtime/ui/react/style.css".