CheckboxReactHookFormSingle() — ui Function Reference
Architecture documentation for the CheckboxReactHookFormSingle() function in checkbox-form-single.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD d6027f1a_19dd_6b30_5ded_9770ca8599c5["CheckboxReactHookFormSingle()"] b979fe27_5368_2446_6f6f_98476ed91cc3["checkbox-form-single.tsx"] d6027f1a_19dd_6b30_5ded_9770ca8599c5 -->|defined in| b979fe27_5368_2446_6f6f_98476ed91cc3 style d6027f1a_19dd_6b30_5ded_9770ca8599c5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
deprecated/www/registry/new-york/examples/checkbox-form-single.tsx lines 24–73
export default function CheckboxReactHookFormSingle() {
const form = useForm<z.infer<typeof FormSchema>>({
resolver: zodResolver(FormSchema),
defaultValues: {
mobile: true,
},
})
function onSubmit(data: z.infer<typeof FormSchema>) {
toast({
title: "You submitted the following values:",
description: (
<pre className="mt-2 w-[340px] rounded-md bg-slate-950 p-4">
<code className="text-white">{JSON.stringify(data, null, 2)}</code>
</pre>
),
})
}
return (
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-6">
<FormField
control={form.control}
name="mobile"
render={({ field }) => (
<FormItem className="flex flex-row items-start space-x-3 space-y-0 rounded-md border p-4 shadow">
<FormControl>
<Checkbox
checked={field.value}
onCheckedChange={field.onChange}
/>
</FormControl>
<div className="space-y-1 leading-none">
<FormLabel>
Use different settings for my mobile devices
</FormLabel>
<FormDescription>
You can manage your mobile notifications in the{" "}
<Link href="/examples/forms">mobile settings</Link> page.
</FormDescription>
</div>
</FormItem>
)}
/>
<Button type="submit">Submit</Button>
</form>
</Form>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does CheckboxReactHookFormSingle() do?
CheckboxReactHookFormSingle() is a function in the ui codebase, defined in deprecated/www/registry/new-york/examples/checkbox-form-single.tsx.
Where is CheckboxReactHookFormSingle() defined?
CheckboxReactHookFormSingle() is defined in deprecated/www/registry/new-york/examples/checkbox-form-single.tsx at line 24.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free