Components

Input

Text input component for collecting user data with validation support and multiple input types for government applications.

Basic Usage

A simple text input field for basic data collection.

With Label

Input field with a descriptive label for better accessibility and user guidance.

Input States

Different states of the input component including default, error, and disabled states.

This field is required

Input Types

Different HTML input types for various data collection needs in government forms.

Government Form Example

A practical example showing input fields in a citizen registration form with bilingual labels.

Citizen Registration Form / নাগরিক নিবন্ধন ফর্ম

Use Cases

Personal Information

Names, addresses, phone numbers, email addresses, personal details

Authentication

Passwords, PINs, security questions, two-factor authentication codes

Search & Filter

Application search, document lookup, service finder, citizen records

Data Entry

Application forms, registration data, document details, financial information

Best Practices

Form Design

  • • Group related fields together logically
  • • Use appropriate input types for data validation
  • • Provide clear, descriptive labels for all fields
  • • Indicate required fields with asterisks (*)

User Experience

  • • Provide helpful placeholder text as examples
  • • Use real-time validation for immediate feedback
  • • Support both keyboard and touch interactions
  • • Implement proper focus management and tab order

Accessibility & Localization

  • • Include bilingual labels and placeholders
  • • Ensure proper contrast ratios for all states
  • • Support screen readers with proper ARIA labels
  • • Handle different input methods and languages

Usage Guidelines

Do

  • Use appropriate input types for data validation
  • Provide clear labels and helpful placeholder text
  • Show validation errors immediately and clearly
  • Support both English and Bengali text input
  • Use consistent spacing and alignment
  • Implement proper focus indicators

Don't

  • Use generic "text" type for specialized data
  • Make error messages vague or unhelpful
  • Use placeholder text as the only label
  • Disable inputs without clear explanation
  • Ignore mobile keyboard considerations
  • Use auto-focus on inputs within modals

Component Specifications

Detailed specifications and characteristics of the Input component for implementation guidance.

SpecificationDetailsPurpose & Usage
Component TypeForm Input ElementCaptures user text input and data entry in forms and interfaces
Complexity LevelLowSimple to implement with comprehensive validation and accessibility features
Input TypesText, Email, Password, Number, Search, Date, TelSpecialized input types for different data formats and validation rules
State ManagementDefault, Focus, Error, Disabled, RequiredClear visual feedback for user interactions and validation states
Validation FeaturesRequired validation, Length limits, Type validation, Custom rulesEnsures data quality and provides immediate feedback to users
Accessibility FeaturesLabel association, Screen reader support, Keyboard navigation, Focus indicatorsEnsures usability for all citizens including those with disabilities
Language SupportEnglish, Bengali (বাংলা)Bilingual text input and placeholder support for government applications
Design SystemColor tokens, Typography scale, Border radius, Shadow systemConsistent with CivixUI design principles and government branding
Mobile OptimizationVirtual keyboard support, Touch-friendly sizing, Responsive designOptimized for mobile government service applications
Use CasesForm fields, Search boxes, Data entry, Contact informationEssential form element for collecting citizen information and data

Accessibility

  • • All inputs support keyboard navigation and screen readers
  • • Labels are properly associated with input fields using htmlFor/id
  • • Error states are announced to assistive technologies
  • • Focus indicators are clearly visible and meet WCAG standards
  • • Input types provide appropriate virtual keyboards on mobile
  • • Required fields are marked and announced to screen readers