Skip to content

KCollapse

Use Collapse to store contents.

Install

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

Basic usage

You can expand multiple panels

Jean-Christophe
Germinal
Pride and Prejudice

Custom title and content

You can render content through slots

🍓 Germinal
🍒 Pride and Prejudice

Accordion

Use the KCollapseWrapper component to wrap and set the uid to enable the accordion style

Jean-Christophe 1
Jean-Christophe 2
Jean-Christophe 3
Jean-Christophe 4

Collapse Props

NameTypeDefaultDescription
titlestring-Content of Collapse Item title
contentstring-Content of Collapse Item
showbooleanfalseExpand the Collapse
showClosebooleantrueDetermine whether display close ionc
uidstring-Incoming in accordion style
clsstring-Additional class
attrsRecord<string, string>{}Additional attributes

Collapse Events

NameDescriptionType
changeEvent fired when the show is changes(show: Event)=> void

Collapse Slots

NameDescription
titleCustomize Collapse Item title content
contentCustomize Collapse Item content
closeIconCustomize close icon

Collapse Wrapper Props

NameTypeDefaultDescription
accordionbooleanfalseWhether to use accordion style
clsstring-Additional class
attrsRecord<string, string>{}Additional attributes

Collapse Wrapper Slots

NameDescription
defaultCustomize Collapse wrapper content

MIT Licensed