Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Components
  2. Input
  3. API and Development

Input

API and Development

View SourceOpens in a new tabSubmit IssueOpens in a new tab
Input from @prepared911/ui/input is the native text control. It has no label, no icons, and no mask. A labeled field is Field from @prepared911/ui/field. onValueChange(value, details) replaces onChange(event).
Input
PropMeaning
value / defaultValueThe text.
onValueChangeNext value and a reason.
sizeInputSize.
textTypeTextType.Body (default), TextType.Code1 or TextType.Code2. A code role sets the monospace font for URLs, ids and other text read character by character.
disabled / readOnly / requiredNative states.
nameSubmitted with the form.
Code font
Set textType to a monospace role for a URL, an id or another value read character by character. It reuses Text's TextType, so there is no font token or className to pass, and the control keeps its height.
Field adornments
Icons, prefix and suffix text, a trailing action, description, and error live on Field.
PropMeaning
labelVisible name.
leadingIcon / trailingIconDecorative icons.
actionOne button at the end. Search and Password own their own trailing control.
typeFieldType, including Email, Tel, Search, and Password.
maskA mask. Not a separate enum on Input.
description / errorHelper and error copy.
An international country select is not built. Phone numbers use FieldType.Tel.
Previous
Input / Usage
Next
Accessibility / Labels and Identification
On this page
Input
Code font
Field adornments