TextareaPro
A multiline field for notes and longer text, with helper and error rows that open on a spring and a count that rolls only the digits that changed.
oxyn add labeled-textareaThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- The multi-line Input: the same helper and error rows, plus an optional count (“· 120 characters”) whose digits roll as you type.
When not to use
- On or off for things that apply right away: use Switch instead.
- A real checkbox with a label and second line, an indeterminate state for Select all, an error, a card row and a check that draws itself: use Checkbox instead.
- Pick one: use Radio group instead.
Installation
Textarea is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add labeled-textareaUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Count
The count rolls only the digits that change as you type.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Error
Error row with role=alert.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
LabeledTextarea
| Prop | Type | Default | Description |
|---|---|---|---|
labelrequired | String | — | Label. |
value | String | Default::default() | Initial value. |
placeholder | Option<String> | Default::default() | Placeholder. |
description | Option<String> | Default::default() | Helper copy. |
error | Option<String> | Default::default() | Error copy (replaces the helper). |
count | bool | Default::default() | Append the character count to the helper. |
rows | usize | 4 | Visible rows. |
max_length | Option<usize> | Default::default() | Character limit. |
disabled | bool | Default::default() | Disabled. |
on_input | EventHandler<String> | — | Every edit. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Focuses the field |
Accessibility
- aria-describedby links the helper or error row; the error is role=alert.
From the spec
- role=alert on errors; aria-describedby.
Motion & interaction
Timing
- Reduced motion: rows open at full height, words and digits swap without rise or roll, the ghost appears and turns solid without fading, the height tween is off.
Responsive behaviour
- Fills its container; resizes vertically.
Edge cases (spec)
- Fills its container; resizes vertically.
Notes for AI
- Import
LabeledTextareafromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - There is no GPUI version yet; use the Dioxus component.
- Props to set first:
label. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.