KButton
Commonly used button.
Install
bash
pnpm add @ikun-ui/buttonpnpm add @ikun-ui/buttonbash
yarn add @ikun-ui/buttonyarn add @ikun-ui/buttonbash
npm install @ikun-ui/buttonnpm install @ikun-ui/buttonBasic usage
Use type, round and circle to define Button's style.
Disabled Button
Use disabled attribute to determine whether a button is disabled.
It accepts a Boolean value.
Icon Button
Use the icon attribute to add icon.
Button Props
| Name | Type | Default | Description |
|---|---|---|---|
| icon | string | - | The class name of the icon, following the unocss standard |
| circle | boolean | false | Determine whether it's a circle button |
| round | string | - | Button's border radius |
| disabled | boolean | false | Disable the button |
| type | enum | 'success' / 'error' / 'warning' / 'info'/ 'primary' | Button type |
| cls | string | - | Additional class for |
| attrs | any | {} | Additional attributes |
Button Events
| Name | Description | Type |
|---|---|---|
| click | Event fired when the button is clicked | (e: Event)=> void |
Button Slots
| Name | Description |
|---|---|
| default | Customize default content |