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
Name | Type | Default | Description |
---|---|---|---|
title | string | - | Content of Collapse Item title |
content | string | - | Content of Collapse Item |
show | boolean | false | Expand the Collapse |
showClose | boolean | true | Determine whether display close ionc |
uid | string | - | Incoming in accordion style |
cls | string | - | Additional class |
attrs | Record<string, string> | {} | Additional attributes |
Collapse Events
Name | Description | Type |
---|---|---|
change | Event fired when the show is changes | (show: Event)=> void |
Collapse Slots
Name | Description |
---|---|
title | Customize Collapse Item title content |
content | Customize Collapse Item content |
closeIcon | Customize close icon |
Collapse Wrapper Props
Name | Type | Default | Description |
---|---|---|---|
accordion | boolean | false | Whether to use accordion style |
cls | string | - | Additional class |
attrs | Record<string, string> | {} | Additional attributes |
Collapse Wrapper Slots
Name | Description |
---|---|
default | Customize Collapse wrapper content |