KButton
Commonly used button.
Install
bash
pnpm add @ikun-ui/button
pnpm add @ikun-ui/button
bash
yarn add @ikun-ui/button
yarn add @ikun-ui/button
bash
npm install @ikun-ui/button
npm install @ikun-ui/button
Basic 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 |