Textarea 16

PreviousNext

A textarea with separate submit button below for form submission

Docs
shadcn-studiocomponent

Preview

Loading preview…
registry/new-york/components/textarea/textarea-16.tsx
import { useId } from 'react'

import { Button } from '@/registry/new-york/ui/button'
import { Label } from '@/registry/new-york/ui/label'
import { Textarea } from '@/registry/new-york/ui/textarea'

const TextareaWithButtonDemo = () => {
  const id = useId()

  return (
    <div className='w-full max-w-xs space-y-2'>
      <Label htmlFor={id}>Textarea with button</Label>
      <Textarea id={id} placeholder='Type your feedback here' />
      <Button size='sm'>Submit Feedback</Button>
    </div>
  )
}

export default TextareaWithButtonDemo

Installation

npx shadcn@latest add @shadcn-studio/textarea-16

Usage

import { Textarea16 } from "@/components/textarea-16"
<Textarea16 />