KInput
Input data using keyboard.
Install
bash
pnpm add @ikun-ui/inputpnpm add @ikun-ui/inputbash
yarn add @ikun-ui/inputyarn add @ikun-ui/inputbash
npm install @ikun-ui/inputnpm install @ikun-ui/inputBasic usage
Prefix icon and suffix icon input
Set the prefix through the icon attribute
Disabled input
Disable the input through the disabled attribute
Input Props
| Name | Type | Default | Description |
|---|---|---|---|
| value | string | - | Binding value |
| iconPrefix | string | - | The class name of the prefix icon, following the unocss standard |
| iconPrefix | string | - | The class name of the suffix icon, following the unocss standard |
| placeholder | string | false | Input's placeholder |
| disabled | boolean | false | Disable the Input |
| cls | string | - | Additional class |
| attrs | any | {} | Additional attributes |
Input Events
| Name | Description | Type |
|---|---|---|
| input | Event fired on input | (value: HTMLInputElement.value)=> void |
| enter | Event fired when enter is pressed | (value: Event)=> void |
| keydown | Event fired when keyboard is pressed | (value: Event)=> void |
| change | Event fired when the value is changes | (value: Event)=> void |
Input Slots
| Name | Description |
|---|---|
| prefix | Customize input prefix content |
| suffix | Customize input suffix content |