Skip to content

KModal

Modal dialogs.

Install

bash
pnpm add @ikun-ui/modal
bash
yarn add @ikun-ui/modal
bash
npm install @ikun-ui/modal

Basic usage

Define the footer button layout through the layout attribute

Implement custom header and footer through slots

NameTypeDefaultDescription
titlestring-content of Modal title
footerbooleanfalseShow bottom footer button
showbooleanfalseshow the Modal
layout'center' / 'right'centerfooter button layout
clsstring-Additional class
attrsRecord<string, string>{}Additional attributes
NameDescriptionType
cancelFired when the cancel button is clicked(e: Event)=> void
confirmFired when the confirm button is clicked(e: Event)=> void
closeTriggered when the Modal is closed(show: Event)=> void
NameDescription
defaultCustomize Modal content
headerCustomize Modal header
footerCustomize Modal footer

MIT Licensed