View Source SaladUI.Collapsible (SaladUI v0.13.1)
Implementation of Collapsible components.
## Examples:
<.collapsible id="collapsible-1" open let={builder}>
<.collapsible_trigger builder={builder}>
<.button variant="outline">Show content</.button>
</.collapsible_trigger>
<.collapsible_content>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
</.collapsible_content>
</.collapsible>
Summary
Functions
Attributes
id
(:string
) (required) - Id to identify collapsible component, collapsible_trigger uses this id to toggle content visibility.open
(:boolean
) - Initial state of collapsible content. Defaults tofalse
.class
(:string
) - Defaults tonil
.
Slots
inner_block
(required)
Render content for collapsible component.
Render trigger for collapsible component.
Show collapsible content.
Functions
Attributes
id
(:string
) (required) - Id to identify collapsible component, collapsible_trigger uses this id to toggle content visibility.open
(:boolean
) - Initial state of collapsible content. Defaults tofalse
.class
(:string
) - Defaults tonil
.
Slots
inner_block
(required)
Render content for collapsible component.
Attributes
class
(:string
) - Defaults tonil
.- Global attributes are accepted.
Slots
inner_block
(required)
Render trigger for collapsible component.
Attributes
builder
(:map
) (required) - Builder instance for collapsible component.class
(:string
) - Defaults tonil
.
Slots
inner_block
(required)
Show collapsible content.