---
parts:
- Collapsible
- Use Cases
title: 'Collapsible: Use Cases'
eleventyNavigation:
key: 'Collapsible: Use Cases'
order: 20
parent: Collapsible
title: Use Cases
---
# Collapsible: Use Cases
```js script
import { html } from '@mdjs/mdjs-preview';
import '@lion/ui/define/lion-collapsible.js';
```
## Default open
Add the `opened` attribute to keep the component default open.
```js preview-story
export const defaultOpen = () => html`
Most definitions of cars say that they run primarily on roads, seat one to eight people, have
four tires, and mainly transport people rather than goods.
`;
```
## Methods
There are the following methods available to control the extra content for the collapsible.
- `toggle()`: toggle the extra content
- `show()`: show the extra content
- `hide()`: hide the extra content
```js preview-story
export const methods = ({ shadowRoot }) => html`
Most definitions of cars say that they run primarily on roads, seat one to eight people, have
four tires, and mainly transport people rather than goods.
`;
```
## Events
`lion-collapsible` fires an event on `invoker` click to notify the component's current state. It is useful for analytics purposes or to perform some actions while expanding and collapsing the component.
- `@opened-changed`: triggers when collapsible either gets opened or closed
```js preview-story
export const events = ({ shadowRoot }) => html`
Most definitions of cars say that they run primarily on roads, seat one to eight people, have
four tires, and mainly transport people rather than goods.