Skip to content

Input

Single-line text form control with label, validation, icons, masking, and debounced input.

HTML tag: c-e95989f31e5f940b2a7bf7661c35d65ad

  • single-line text, number, email, or password
  • search box with clear button
  • masked or validated text field
PropTypeDefaultDescription
typestringtext
valuestring
placeholderstring
labelstring
statusstringdefault
requiredboolean
disabledboolean
readonlyboolean
clearableboolean
input_idstring
helper_textstring
error_textstring
reveal_passwordboolean
max_lengthnumber
min_lengthnumber
patternstring
autocompletestringoff
namestring
debounce_msnumber150
prefix_iconstring
suffixstring
sizestringmd
densitystringcomfortable
tonestringneutral
aria_labelstring
aria_describedbystring
select_on_focusboolean
commit_on_enterbooleantrue
clear_on_escapeboolean
prefix_clickableboolean
suffix_clickableboolean
stepstringany
minstring
maxstring
spellcheckboolean
autocapitalizestringoff
autocorrectstringoff
mask_patternstring
mask_placeholderstring_
mask_autofixbooleantrue
async_validator_idstring
icon_loadingboolean
show_counterbooleantrue
label_positionstringstacked
suffix_iconstring
  • Bind .value as string; set .type for text, password, number, email, etc.
  • input-changed fires during edit (respect debounce_ms); value-committed on commit (blur/enter per commit_on_enter).
  • Use status/error_text/helper_text or validated event for errors.
  • prefix_icon/suffix_icon use mi: prefix like ab-icon.
EventDetail
input-changedvalue: string
value-committedvalue: string
validatedvalid: boolean, errors: array
focus
blur
cleared
prefix-clickoriginalEvent: object
suffix-clickoriginalEvent: object
reveal-togglerevealed: boolean
SignatureDescription
focus()
blur()
select()
setValue(value: string, options: object)
validate()
clear()

Do not use for boolean (ab-checkbox), option lists (ab-select/ab-radio-group), or dates (ab-date-field). Do not use for multi-line prose (ab-textarea).

<c-e95989f31e5f940b2a7bf7661c35d65ad .label=${'Email'} .type=${'email'} .value=${email} .required=${true} @input-changed=${e => email = e.detail.value} @value-committed=${onCommit}></c-e95989f31e5f940b2a7bf7661c35d65ad>