React Hook Form bindings for labels, controls, descriptions, and messages. Values and errors are pinned so the preview does not drift.
pnpm dlx shadcn@latest add https://stylexcn.vercel.app/r/form.jsonpnpm dlx shadcn@latest add @stylexcn/form<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)}>
<FormField
control={form.control}
name="username"
render={({ field }) => (
<FormItem>
<FormLabel>Username</FormLabel>
<FormControl>
<Input placeholder="shadcn" {...field} />
</FormControl>
<FormDescription>
This is your public display name.
</FormDescription>
<FormMessage />
</FormItem>
)}
/>
<Button type="submit">Submit</Button>
</form>
</Form>