Skip to content
On this page

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

NameTypeDefaultDescription
valuestring-Binding value
iconPrefixstring-The class name of the prefix icon, following the unocss standard
iconPrefixstring-The class name of the suffix icon, following the unocss standard
placeholderstringfalseInput's placeholder
disabledbooleanfalseDisable the Input
clsstring-Additional class
attrsany{}Additional attributes

Input Events

NameDescriptionType
inputEvent fired on input(value: HTMLInputElement.value)=> void
enterEvent fired when enter is pressed(value: Event)=> void
keydownEvent fired when keyboard is pressed(value: Event)=> void
changeEvent fired when the value is changes(value: Event)=> void

Input Slots

NameDescription
prefixCustomize input prefix content
suffixCustomize input suffix content

MIT Licensed