View Source SaladUI.Collapsible (SaladUI v0.14.9)
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 totrue.class(:string) - Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["title"].
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 totrue.class(:string) - Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["title"].
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
class(:string) - Defaults tonil.as_tag(:any) - Defaults to"div".- Global attributes are accepted.
Slots
inner_block(required)
Show collapsible content.