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

Input

Live preview

Usage

Include CSS

Import Tailwind and one full A3S UI style bundle.

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

Or import only the base CSS, Input component CSS, and one style pack.

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

Using CDN or bundler imports? See the Installation page.

Add your input HTML

Add class="input" to supported <input> elements. Inputs inside a class="field" container also receive the same styling automatically for common text-like input types.

Use native HTML attributes for behavior: disabled for disabled inputs, required for required fields, and aria-invalid="true" for invalid state styling.

<input class="input" type="email" aria-label="Email" placeholder="Email" />

Examples

Basic

Live preview

Field

Use field with a label and description to create an accessible field.

Live preview

Enter your email address.

Field group

Live preview

Disabled

Live preview

Invalid

Live preview

File

Live preview

Inline

Live preview

Grid

Live preview

Required

Live preview

Badge

Live preview

Input group

Use the Input Group patterns to add icons, text, or buttons inside an input.

Live preview

Button group

Use Button Group when an input should be grouped with adjacent buttons.

Live preview

Form

Live preview

This is your public display name.

RTL

Inputs support right-to-left layouts through native browser direction handling. Add dir="rtl" to the input, field, or an ancestor.

Live preview

مفتاح API الخاص بك مشفر ومخزن بأمان.