{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"shadcn-studio/form-06","type":"registry:component","title":"Form 6","description":"Form with textarea component for multi-line text input","dependencies":["@hookform/resolvers","lucide-react","react-hook-form","sonner","zod@3.25.76"],"registryDependencies":["alert","button","field","textarea"],"files":[{"path":"src/registry/new-york/components/form/form-06.tsx","content":"'use client'\n\nimport * as React from 'react'\n\nimport { CheckCheckIcon } from 'lucide-react'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { Controller, useForm } from 'react-hook-form'\nimport { toast } from 'sonner'\nimport * as z from 'zod'\n\nimport { Alert, AlertTitle } from '@/registry/new-york/ui/alert'\nimport { Button } from '@/registry/new-york/ui/button'\nimport { Field, FieldDescription, FieldError, FieldLabel } from '@/registry/new-york/ui/field'\nimport { Textarea } from '@/registry/new-york/ui/textarea'\n\n// Define the form schema\nconst formSchema = z.object({\n  message: z\n    .string()\n    .min(50, 'Message must be at least 50 characters long.')\n    .max(500, 'Message cannot exceed 500 characters.')\n})\n\ntype FormValues = z.infer<typeof formSchema>\n\nconst TextareaFormDemo = () => {\n  const form = useForm<FormValues>({\n    resolver: zodResolver(formSchema),\n    defaultValues: {\n      message: ''\n    }\n  })\n\n  function onSubmit() {\n    toast.custom(() => (\n      <Alert className='border-green-600 text-green-600 sm:w-110 dark:border-green-400 dark:text-green-400'>\n        <CheckCheckIcon />\n        <AlertTitle>Your application is submitted. We will contact you soon.</AlertTitle>\n      </Alert>\n    ))\n  }\n\n  return (\n    <form onSubmit={form.handleSubmit(onSubmit)} className='w-full max-w-xs space-y-6'>\n      <Controller\n        name='message'\n        control={form.control}\n        render={({ field, fieldState }) => (\n          <Field data-invalid={fieldState.invalid}>\n            <FieldLabel htmlFor={field.name}>Tell Us About Yourself</FieldLabel>\n            <Textarea\n              {...field}\n              id={field.name}\n              aria-invalid={fieldState.invalid}\n              placeholder=\"Why do you think you're the perfect fit for this position?\"\n            />\n            <FieldDescription>\n              Please include your qualifications, skills, and experiences that make you stand out.\n            </FieldDescription>\n            {fieldState.invalid && <FieldError errors={[fieldState.error]} />}\n          </Field>\n        )}\n      />\n\n      <Button type='submit'>Submit</Button>\n    </form>\n  )\n}\n\nexport default TextareaFormDemo\n","type":"registry:component","target":"components/shadcn-studio/form/form-06.tsx"}]}