Primitives/Textarea
Textarea
Auto-growing multi-line field matching Input.
- Version
- 1.0.1
- Tier
- Primitive
- Updates taken
- Minor and patch
- Files
- 1
Preview
Install
In a project already set up on the contract, which is what registers the @ja3dan prefix. If yours isn't, set it up first.
bunx shadcn@latest add @ja3dan/textarea Source
What lands in your project, read from the published item rather than the working tree.
import * as React from "react";import { cn } from "@/lib/utils";function Textarea({ className, ...props }: React.ComponentProps<"textarea">) { return ( <textarea data-slot="textarea" className={cn( "flex field-sizing-content min-h-20 w-full rounded-md border border-input bg-card px-3 py-2 text-sm text-foreground transition-[border-color,box-shadow] duration-150 ease-out outline-none placeholder:text-subtle-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive", className, )} {...props} /> );}export { Textarea };