Exemples
Base collapsible
You can really put anything in here !
Heading
- List item 1
- List item 2
- Sub list item 1
- Sub list item 2
With code inside
You can add all sorts of things in here including code blocks
function logSomething(something) {
console.log('Something', something);
}
With an icon
Wow! this collapsible is super pretty
Group of collapsible
To make a collapsible group, you just have to wrap your collapsible into the Collapsible.Group
component.
Collapsible 1
function collapsibleFunction() {
return 'Yay!';
}
Collapsible 2
function collapsibleFunction() {
return 'Yay!';
}
Collapsible 3
function collapsibleFunction() {
return 'Yay!';
}
Definition
Collapsible
The collapsible component.
summary
string
Required
The summary text that will appear when the collapsible is closed.
<slot>
HTMLElement
Required
The contents of the collapsible when it is expanded. Can contain markdown.
open
$bindable(boolean)
Default: false
Whether the collapsible is open by default or not.
class
string
List of classes to apply the the outside most element.
Collapsible.Group
The collapsible group wrapper component.
<slot>
HTMLElement
Required
A list of Collapsible
.
NOTE :
This component is just a wrapper. It dos't have any props except for the slot
.
Last updated : Aug 14, 2024