@axadrn starred 3 repositories
Installation
Install the component
templui add collapsibleAdd the JavaScript to your layout
@collapsible.Script()Call this template in your base layout file (e.g., in the <head> section).
API Reference
Collapsible
Root container for collapsible content. Controls the open/closed state.
| Name | Type | Default |
|---|---|---|
Unique identifier for the collapsible. Auto-generated if not provided. | | |
Additional CSS classes to apply to the collapsible. | | - |
Additional HTML attributes to apply to the collapsible element. | | - |
Whether the collapsible is initially open. | | |
Trigger
Button that toggles the collapsible content. Automatically handles click events and keyboard navigation.
| Name | Type | Default |
|---|---|---|
Unique identifier for the trigger button. | | - |
Additional CSS classes to apply to the trigger button. | | - |
Additional HTML attributes to apply to the trigger button. | | - |
Content
Content that expands and collapses. Uses smooth height transitions for animations.
| Name | Type | Default |
|---|---|---|
Unique identifier for the content element. | | - |
Additional CSS classes to apply to the content container. | | - |
Additional HTML attributes to apply to the content element. | | - |