Basic Usage
Sizes
Inputs support 5 different sizes:The size of the input field
With Icon
Add a leading icon to the input:Icon name from the HugeIcon library to display at the start of the input
Clear Button
By default, a clear button appears when the input has content:Shows a button to clear the input value
Additional events to fire when the clear button is clicked
Form Integration
Value Control
Props Reference
Placeholder text when input is empty
HTML input type (text, email, password, number, etc.)
Controlled value of the input
Initial uncontrolled value
Event fired when input value changes
Alternative change event handler
Event fired on key press
Event fired when input gains focus
Event fired when input loses focus
Disables the input
Makes the input required for form submission
Makes the input read-only
Form field name for submission
HTML id attribute (auto-generated if not provided)
Additional CSS classes
Auto-Complete Settings
The input automatically disables browser autocomplete features:autoComplete="off"autoCapitalize="none"autoCorrect="off"spellCheck="false"
custom_attrs if needed.
Low-Level API
For direct control, use the root component:Implementation Details
From source code atreflex_ui/components/base/input.py:67:
- High-level wrapper creates a div container with icon, input, and clear button
- Uses focus-within for container styling
- Clear button opacity controlled by CSS peer selectors
- Supports all standard HTML input attributes