KInput
Input data using keyboard.
Install
bash
pnpm add @ikun-ui/input
pnpm add @ikun-ui/input
bash
yarn add @ikun-ui/input
yarn add @ikun-ui/input
bash
npm install @ikun-ui/input
npm install @ikun-ui/input
Basic 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 |