Core@paxeer/core/textareaimplemented
Textarea
shadcn Textarea restyled to MD3.
Install
$
pnpm exec designx add @paxeer/core/textareaPreview
Source code
components/designx/core/textarea.tsxtsx
import { type ComponentProps } from "react";
import { cn } from "../lib/cn";
/** Adapted from shadcn/ui Textarea. */
export function Textarea({ className, ...props }: ComponentProps<"textarea">) {
return (
<textarea
data-slot="textarea"
className={cn(
"dx-focus-ring field-sizing-content flex min-h-16 w-full rounded-[var(--md-sys-shape-corner-small)] border border-outline-variant bg-surface-container-lowest px-3 py-2 text-[length:var(--md-sys-typescale-body-medium-size)] text-on-surface shadow-xs placeholder:text-on-surface-variant disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-error",
className,
)}
{...props}
/>
);
}
Dependencies
Registry dependencies