Input Text
The Input Text component provides a customizable text input field with support for multiline, password, validation, and rich accessibility features.
Basic usage
The Input Text component offers three variants through different selectors:
<
: Standard single-line inputlmn-input-text ><
: Multiline textarealmn-input-text-multiline ><
: Password input with visibility togglelmn-input-text-password >
Component anatomy
Label and Markers
Configure input labeling using:
- Label content projection
requiredMarker
Input for required fieldsdisabledMarker
Input for disabled statereadonlyMarker
Input for readonly statelanguageCode
andlanguage
Inputs for language indication
Required state
Disabled state
Read-only state
Language indication
Content Control
Manage input behavior with:
placeholder
Input for placeholder textautoComplete
Input for autocomplete behaviormaxLength
for character limit- Character counter display
- Spell check configuration
- Clear button option
Prefilled value
Placeholder
Maximum length
Hiding the Clear button
Validation States
Handle validation through:
- Required state
- Error messages
- Alert messages
- Helper text
- Visual error indicators
- Dynamic validator messages
Required state
Alert message
Error message
Helper text
Interactive States
Support for multiple states:
- Focus state with visual feedback
- Disabled state with optional reason tooltip
- Read-only mode
- Active state
- Filled state indication
Contextual Actions
Add supplementary actions:
- Clear button (optional)
- Password visibility toggle
- Custom action button
- Action tooltips
- Action ARIA labels
Additional contextual elements
Input text enables developers to customize even further the contextual elements, both at the start and end edges of the input field:
- Custom icons
- Completely custom elements (this can include again also icons and buttons)
Custom icons
Custom elements
Negative Theme
Enable dark theme using the negative
Input, affecting:
- Background colors
- Text colors
- Border colors
- Icon colors
- Focus indicators
Accessibility
ARIA Support
Comprehensive ARIA implementation:
- Proper input roles
- Label relationships
- Error/alert announcements
- Helper text connections
- State descriptions
Keyboard Navigation
Full keyboard support:
- Tab navigation
- Focus management
- Clear action support
- Password visibility toggle
- Custom action handling
Visual Feedback
Clear state indication:
- Focus rings
- Error states
- Required fields
- Disabled state
- Read-only state
Best Practices for Developers
Label Usage DEMO HERE
Validation Implementation DEMO HERE
State Management DEMO HERE