Collapsible
An interactive component that expands and collapses content.
Installation
dotnet add package Lumeo
One-time app setup (AddLumeo(), CSS & JS) is covered in the
installation guide.
Usage
@using Lumeo <Collapsible />
When to Use
- Showing and hiding optional content such as advanced settings or extra details
- Expandable sidebar sections for navigation grouping
- Spoiler text or progressive disclosure where content is hidden by default
Starred Repositories
@shadcn/ui
More info
This section was initially expanded and can be toggled open and closed.
API Reference
Collapsible
| Prop | Type | Default | Description |
|---|---|---|---|
| ChildContent | RenderFragment? | null | Content including trigger and collapsible content. |
| Open | bool | false | Controls whether the content is visible. Use with @bind-Open. |
| OpenChanged | EventCallback<bool> | — | Callback invoked when the open state changes. |
| Class | string? | null | Additional CSS classes. |
| AdditionalAttributes | Dictionary<string, object>? | null | Additional HTML attributes. |
| IsOpen | bool | > Open | Obsolete alias for Open; will be removed in a future release. |
| IsOpenChanged | EventCallback<bool> | > OpenChanged | Obsolete alias for OpenChanged; will be removed in a future release. |
CollapsibleTrigger
| Prop | Type | Default | Description |
|---|---|---|---|
| ChildContent | RenderFragment? | null | Clickable trigger content. |
| Class | string? | null | Additional CSS classes. |
| AdditionalAttributes | Dictionary<string, object>? | null | Additional HTML attributes. |
CollapsibleContent
| Prop | Type | Default | Description |
|---|---|---|---|
| ChildContent | RenderFragment? | null | Content shown when the collapsible is open. |
| Class | string? | null | Additional CSS classes. |
| AdditionalAttributes | Dictionary<string, object>? | null | Additional HTML attributes. |