Textarea 3

PreviousNext

A textarea with helper text below for additional context

Docs
shadcn-studiocomponent

Preview

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

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

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

  return (
    <div className='w-full max-w-xs space-y-2'>
      <Label htmlFor={id}>Textarea with helper text</Label>
      <Textarea placeholder='Type your feedback here' id={id} />
      <p className='text-muted-foreground text-xs'>Your feedback is useful for us.</p>
    </div>
  )
}

export default TextareaWithHelperTextDemo

Installation

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

Usage

import { Textarea03 } from "@/components/textarea-03"
<Textarea03 />