Home / Function/ TextareaForm() — supabase Function Reference

TextareaForm() — supabase Function Reference

Architecture documentation for the TextareaForm() function in textarea-form.tsx from the supabase codebase.

Entity Profile

Relationship Graph

Source Code

apps/design-system/registry/default/example/textarea-form.tsx lines 30–74

export default function TextareaForm() {
  const form = useForm<z.infer<typeof FormSchema>>({
    resolver: zodResolver(FormSchema),
  })

  function onSubmit(data: z.infer<typeof FormSchema>) {
    toast('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_Shadcn_ {...form}>
      <form onSubmit={form.handleSubmit(onSubmit)} className="w-2/3 space-y-6">
        <FormField_Shadcn_
          control={form.control}
          name="bio"
          render={({ field }) => (
            <FormItem_Shadcn_>
              <FormLabel_Shadcn_>Bio</FormLabel_Shadcn_>
              <FormControl_Shadcn_>
                <Textarea
                  placeholder="Tell us a little bit about yourself"
                  className="resize-none"
                  {...field}
                />
              </FormControl_Shadcn_>
              <FormDescription_Shadcn_>
                You can <span>@mention</span> other users and organizations.
              </FormDescription_Shadcn_>
              <FormMessage_Shadcn_ />
            </FormItem_Shadcn_>
          )}
        />
        <Button htmlType="submit" type="alternative">
          Submit
        </Button>
      </form>
    </Form_Shadcn_>
  )
}

Domain

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free