View Source SaladUI.Accordion (SaladUI v0.13.1)

Accordion component for displaying collapsible content.

Example

<.accordion> <.accordion_item>

<.accordion_trigger group="exclusive">
  Is it accessible?
</.accordion_trigger>
<.accordion_content>
  Yes. It adheres to the WAI-ARIA design pattern.
</.accordion_content>

</.accordion_item> <.accordion_item>

<.accordion_trigger group="exclusive">
  Is it styled?
</.accordion_trigger>
<.accordion_content>
  Yes. It comes with default styles that matches the other components' aesthetic.
</.accordion_content>

</.accordion_item> <.accordion_item>

<.accordion_trigger group="exclusive">
  Is it animated?
</.accordion_trigger>
<.accordion_content>
  Yes. It's animated by default, but you can disable it if you prefer.
</.accordion_content>

</.accordion_item> </.accordion>

Summary

Functions

Attributes

  • class (:string) - Defaults to nil.

Slots

  • inner_block (required)

Attributes

  • class (:string) - Defaults to nil.

Slots

  • inner_block (required)

Attributes

  • class (:string) - Defaults to nil.

Slots

  • inner_block (required)

Attributes

  • group (:string) - Defaults to nil.
  • class (:string) - Defaults to nil.
  • open (:boolean) - Defaults to false.

Slots

  • inner_block (required)

Functions

Attributes

  • class (:string) - Defaults to nil.

Slots

  • inner_block (required)
Link to this function

accordion_content(assigns)

View Source

Attributes

  • class (:string) - Defaults to nil.

Slots

  • inner_block (required)

Attributes

  • class (:string) - Defaults to nil.

Slots

  • inner_block (required)
Link to this function

accordion_trigger(assigns)

View Source

Attributes

  • group (:string) - Defaults to nil.
  • class (:string) - Defaults to nil.
  • open (:boolean) - Defaults to false.

Slots

  • inner_block (required)