For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.4.1/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.4.1/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.4.1/en/components/input.md.

Input

Input captures one native single-line value. It preserves browser editing, selection, validation, autofill, password-manager, input-method, and form behavior while A3S UI supplies a consistent visual contract.

Notification address

Used for release notices and account recovery.

Current value: Not set

Usage

Import Tailwind and one complete A3S UI style bundle:

@import "tailwindcss";
@import "@a3s-lab/ui/a3s.css";

For component-level loading, import the base styles, Input structure, Field structure, and one visual style in that order:

@import "@a3s-lab/ui/base.css";
@import "@a3s-lab/ui/components/input.css";
@import "@a3s-lab/ui/components/field.css";
@import "@a3s-lab/ui/styles/a3s.css";

Use class="input" on a supported native <input>. In production forms, compose it with Field so a visible label and supporting copy remain available before, during, and after editing.

<div class="field">
  <label for="notification-email">Notification email</label>
  <input
    id="notification-email"
    class="input"
    type="email"
    name="notificationEmail"
    autocomplete="email"
    aria-describedby="notification-email-help"
  />
  <p id="notification-email-help">
    Used for release notices and account recovery.
  </p>
</div>

Use Input for one native single-line value. Use Input Group for prefixes, suffixes, icons, units, or inline actions; File Upload for file queues and progress; and Task Composer for rich instructions, mentions, attachments, and queued submission.

Parameters

ParameterPurpose
idConnects the native input to one persistent visible label
nameSupplies the submitted field key; disabled inputs are excluded from FormData
typeSelects native editing, validation, keyboard, autofill, and browser affordances
autocompleteLets browsers and password managers identify the real value purpose
inputmodeRefines the virtual keyboard when type alone does not express it
enterkeyhintLabels the virtual keyboard action without changing native Enter behavior
aria-describedbyAssociates ordinary guidance and, after validation, the current error
required, min, max, step, minlength, maxlength, patternExpress native constraints only when they match the actual data contract
aria-invalid="true"Exposes an authored failed-validation state after validation has run
disabledPrevents focus, editing, validation, and form submission; pair it with a reason
readonlyPreserves focus, selection, copying, and form submission while preventing edits

States and variants

Empty and ready are ordinary value states. Invalid begins only after validation has run. Disabled and read-only are different native availability contracts and must not be presented as interchangeable styling variants.

Type semantics

Choose a type from the data, keyboard, validation, and autofill behavior the user needs. Preserve the browser's own affordances instead of recreating them with decoration.

Native input purposes

Identifiers remain text when leading zeros or exact characters matter.

The browser supplies email validation and an email-oriented keyboard.

Regional formatting and validation remain application concerns.

State whether a scheme is required before validation runs.

Do not block paste, autofill, or password managers.

Use the native picker only when a local date is the complete value.

Use type="number" only when native stepping and numeric constraints match the job. Account numbers, postal codes, identifiers, leading-zero values, and high-precision decimals remain text. Native type="file" is a compatibility boundary; production drag, queue, progress, failure, and retry flows belong to File Upload.

Form validation and recovery

Keep a required field neutral before the first validation attempt. On failure, retain the attempted value, name the problem, focus the field, and add the error to its description relationship. Clear stale error semantics as soon as the value becomes valid or the form resets.

Required workspace address

Use an address that can receive workspace recovery messages.

Client validation improves recovery but never replaces server validation, sanitization, authorization, or stale-response handling.

Disabled and read-only

Disabled removes the value from focus, editing, constraint validation, and form submission. Read-only keeps the value focusable, selectable, copyable, and submitted. Both need a visible reason.

Availability semantics

Workspace policy manages this archived notification address.

Only organization owners can edit this value; it remains selectable and is included in form submission.

Accessibility

  • Keep one persistent visible label. Placeholder text may demonstrate format but never supplies the only name.
  • Associate ordinary guidance through aria-describedby. Add the current error ID only after validation and remove it after recovery.
  • Let native keyboard editing, selection, undo, paste, autofill, password managers, and search/date controls operate unchanged.
  • Do not transform, validate business rules, or submit while an IME composition is active; wait for compositionend.
  • Keep email, telephone, and URL values left-to-right inside RTL layouts so punctuation and prefixes retain their authored order; labels and supporting copy still follow the layout direction.
  • Use one continuous focus boundary. Forced-colors mode replaces the inset visual boundary with a system Highlight outline.
  • On coarse pointers, text-like inputs remain at least 44px high and 16px to avoid mobile focus zoom.
  • Test at 200% browser zoom, with long values, RTL text, CJK input, real mobile keyboards, autofill, password managers, and assistive technology before release.