Themes
- Default
- Catppuccin
- Dracula
- High Contrast
- High Contrast Light
- Monokai
- Nord
- One Dark
- Solarized
- Tokyo Night
- AMOLED
- Aura
- Ayu
- Carbonfox
- Catppuccin Frappe
- Catppuccin Macchiato
- Cobalt2
- Cursor
- Everforest
- Flexoki
- GitHub
- Gruvbox
- Kanagawa
- Lucent Orng
- Material
- Matrix
- Mercury
- Night Owl
- OC-2
- One Dark Pro
- OpenCode
- Orng
- Osaka Jade
- Palenight
- Rose Pine
- Shades of Purple
- Synthwave '84
- Vercel
- Vesper
- Zenburn
Utility
AI
Terminal
Installation
$ pnpm dlx shadcn@latest add @termcn/form
Usage
import { Form } from "@/components/ui/form";<Form
initialValues={{ name: "", email: "" }}
fields={[
{ name: "name", validate: (v) => (v ? null : "Name is required") },
{ name: "email", validate: (v) => (v ? null : "Email is required") },
]}
onSubmit={(values) => console.log("Submitted:", values)}
>
<Text>Name and email form (Ctrl+S to submit)</Text>
</Form>API Reference
Form
| Prop | Type | Default |
|---|---|---|
onSubmit | (values: Record<string, unknown>) => void | required |
initialValues | Record<string, unknown> | {} |
fields | FormField[] | [] |
children | ReactNode | required |