FluxTextField¶
A single-line text input. Use type to pick the semantic kind (email, password, number, …); use state to surface validation status. Always set accessibility.label — screen readers need it even when a visible placeholder exists.
Extends: TextField (a2ui/basic@0.10)
Category: primitive
Props¶
Name |
Type |
Required |
Default |
|---|---|---|---|
|
|
yes |
`` |
|
|
yes |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
yes |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
yes |
|
|
|
yes |
|
|
|
no |
`` |
|
|
yes |
|
|
|
no |
`` |
Examples¶
Basic email field with placeholder.
UI.text_field("email", type="email", placeholder="you@example.com")
Password field with helper text.
UI.text_field("password", type="password", helper="At least 12 characters.")
Numeric field surfacing a validation error.
UI.text_field("age", type="number", state="error", error="Must be 18+")
Anti-patterns¶
Avoid: accessibility.label is required — placeholders are not a11y labels.
UI.text_field("email") # no accessibility.label
Avoid: type=password hides input; reserve it for actual credentials, not long IDs the user may need to paste.
UI.text_field("token", type="password") # masking a non-secret
Tokens used¶
$color.bg.surface$color.border.danger$color.border.default$color.success.solid$color.text.danger$color.text.primary$color.warning.7$radius.lg$radius.md$space.2$space.3$space.4$typography.size.lg$typography.size.md$typography.size.sm
Basic-catalog fallback¶
Component:
TextFieldProp map:
placeholder→placeholder,value→valueNotes: Basic renderers drop size / state / helper / icons — only the raw input with a placeholder survives.