Textarea
Generic multi-line text input with the shared field styling contract.
All components · Theme builder · Implementation source
Live preview
Install
Shell
netscript ui:add textareaUsage and examples
The preview runs this JSX with the installed components. Import any composed primitives from your UI directory.
TypeScript
import { useState } from 'preact/hooks';
import { Textarea } from '@app/components/ui/textarea.tsx';
export function Example() {
const [value, setValue] = useState('standard');
const [open, setOpen] = useState(false);
const [notice, report] = useState('');
return (<><div><Textarea aria-label="Internal note" placeholder="Visible to your team" rows={3} /></div><p role="status">{notice}</p></>);
}Props
Generated from native deno doc --json --private over the shipped implementation. Compound component props retain their owning interface; native attributes pass through where declared.
| Owner | Prop | Type | Optional | Description |
|---|---|---|---|---|
TextareaProps | class | string | Yes | |
TextareaProps | error | boolean | Yes |
TypeScript
TextareaProps extends Omit<JSX.TextareaHTMLAttributes<HTMLTextAreaElement>, "class">Keyboard
| Key | Action |
|---|---|
Enter | Insert newline |
Printable keys | Edit value using native text editing |
Tokens
Semantic contract roles: radius/input, space/stack/gap, text/muted.
CSS custom properties referenced directly: --ns-radius-input.
Contract and compatibility
Accessibility pattern: native textarea
- Native DOM attributes pass through where the implementation accepts them.
- Text and value anatomy is native control content; custom adornments remain planned.
Design contract values marked planned are not implementation props. The props above describe what ships today.