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

Custom title and content

You can render content through slots

Accordion

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

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