AuthenticatorCodeInput
Reusable authenticator code input component.
Usage
Components are auto-discovered. Use the component directly in any .wrn view:
<AuthenticatorCodeInput label="AuthenticatorCode" name="name" value="value" placeholder="placeholder" type="text" />Legacy mount name: data-component="AuthenticatorCodeInput".
Props and attributes
| Prop | Type | Requirement | Default |
|---|---|---|---|
label | string | Optional | "AuthenticatorCode" |
name | string | Optional | "" |
value | string | Optional | "" |
placeholder | string | Optional | "" |
type | string | Optional | "text" |
required | boolean | Optional | false |
disabled | boolean | Optional | false |
readonly | boolean | Optional | false |
help | string | Optional | "" |
error | string | Optional | "" |
class | string | Optional | "" |
Slots
default
Events
This component does not declare a custom event.
Source contract
Installed source: components/AuthenticatorCodeInput.wrn
component AuthenticatorCodeInput {
props {
label = "AuthenticatorCode"
name = ""
value = ""
placeholder = ""
type = "text"
required = false
disabled = false
readonly = false
help = ""
error = ""
class = ""
}
view { <label class="wire-field wire-catalog-field {class}"><span class="wire-label">{label}<span data-show="required" class="wire-required"> *</span></span><input name="{name}" value="{value}" placeholder="{placeholder}" type="{type}" required="{required}" disabled="{disabled}" readonly="{readonly}" aria-invalid="{error ? 'true' : 'false'}" class="wire-input" /><span data-show="help && !error" class="wire-field-message wire-field-message--help">{help}</span><span data-show="error" role="alert" class="wire-field-message wire-field-message--error">{error}</span><slot /></label> }
}