Skip to main content
Back to Examples

Accessible Input Fields

8 Types

A comprehensive collection of input fields with full accessibility support, validation, and RTL support. All fields follow WCAG 2.1 AA best practices.

Accessibility Features

  • Proper ARIA labels
  • Full keyboard navigation
  • Descriptive error messages
  • Focus management
  • Screen reader support
  • Appropriate input modes for mobile
  • Real-time validation
  • Full RTL support

Email Address

We'll never share your email with anyone else

We'll never share your email with anyone else

Example: ahmed@company.sa

Phone Number

Include country code (e.g., +966 for Saudi Arabia)

Include country code (e.g., +966 for Saudi Arabia)

Example: +966501234567

Website URL

Must start with http:// or https://

Must start with http:// or https://

Example: https://company.sa

Card Number

16-digit card number

16-digit card number

Example: 4532015112830366

Password

At least 8 characters with uppercase, lowercase, and numbers

At least 8 characters with uppercase, lowercase, and numbers

Search

Press Enter to search

Press Enter to search

Postal Code

5-digit postal code

5-digit postal code

Example: 11564

Amount (SAR)

Enter amount in Saudi Riyals

Enter amount in Saudi Riyals

Example: 2500.50

Code Example

Example of how to use input fields with validation

<div className="space-y-2">
  <Label htmlFor="email">Email Address</Label>
  <Input
    id="email"
    type="email"
    placeholder="your.email@example.com"
    inputMode="email"
    aria-describedby="email-helper"
  />
  <p id="email-helper" className="text-xs text-muted-foreground">
    We'll never share your email
  </p>
</div>
Input DocsLabel DocsForm Docs