A native textarea element with custom size options.
import { useId } from "react"; import { Textarea } from "@/components/ui/component"; export default function TextareaWithLabel() { const id = useId(); return ( <div className="flex items-center justify-center w-full min-h-screen bg-background p-8"> <div className="flex flex-col items-start gap-2 w-full max-w-sm"> <label htmlFor={id} className="text-sm font-medium text-foreground" > Message </label> <Textarea id={id} placeholder="Type your message here" /> </div> </div> ); }
Part of coss — browse the full library on 21st.dev.