Textarea 4

PreviousNext

A textarea with right-aligned helper text for guidance

Docs
shadcn-studiocomponent

Preview

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

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

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

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

export default TextareaWithHelperTextRightDemo

Installation

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

Usage

import { Textarea04 } from "@/components/textarea-04"
<Textarea04 />