Input
Retrieve text input from a user.
Import
import { Input } from 'raw-ui';Types
Sizes
Width
Disabled
Read only
Default value
Controlled
Inside element
Addon
Password
Clearable
API
| Prop | Description | Type | Default |
|---|---|---|---|
| type | input type | 'default' | 'primary' | 'warning' | 'error' | 'default' |
| size | input size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'md' |
| placeholder | input placeholder | string | - |
| width | input width | string | 'md' |
| disabled | disable input | boolean | false |
| readOnly | read only input | boolean | false |
| defaultValue | default value (uncontrolled) | string | '' |
| value | input value (controlled) | string | - |
| onChange | change event handler | (event: React.ChangeEvent<HTMLInputElement>) => void | - |
| ... | native props | React.InputHTMLAttributes | - |