InputPro
A single-line field with a label, a helper row and an error row that open on a spring; changed words rise in and numbers roll digit by digit.
oxyn add labeled-inputThe 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
- A single-line field with a label, a helper row linked through aria-describedby and an error row (role=alert, aria-invalid) that replaces it.
- Rows open their height on a smooth spring (a grid row from 0fr to 1fr with a slight overshoot); words that changed rise in and unblur while unchanged words stay put, and numbers roll only the digits that changed (keys by place from the end).
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
Input 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-inputUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Helper
Helper copy linked through aria-describedby.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Error
The error row opens on a spring; changed words rise in.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Bare
No helper row.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
LabeledInput
| 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). |
kind | String | "text" | `text` · `email` · `password` · `url`. |
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
- The error row is role=alert and sets aria-invalid.
- Reduced motion opens rows at full height and drops the rise.
From the spec
- role=alert on the error row; aria-invalid; aria-describedby.
Motion & interaction
Timing
- Row height: 420 ms spring-like ease with overshoot; words: 320 ms rise with a 3 px blur; digits: 300 ms roll.
- 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.
Edge cases (spec)
- Fills its container.
Notes for AI
- Import
LabeledInputfromoxyn_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.