PetalComponents.Accordion (petal_components v3.0.0)

View Source

Summary

Functions

Attributes

  • container_id (:string)
  • class (:any) - CSS class for parent container. Defaults to nil.
  • entries (:list) - Defaults to [%{}].
  • variant (:string) - Defaults to "default".
  • js_lib (:string) - JavaScript library used for toggling. Defaults to "alpine_js".
  • open_index (:integer) - Index of item to be open at render. Defaults to nil.
  • Global attributes are accepted.

Slots

  • item (required) - CSS class for parent container. Accepts attributes:
    • heading (:string)

Functions

accordion(assigns)

Attributes

  • container_id (:string)
  • class (:any) - CSS class for parent container. Defaults to nil.
  • entries (:list) - Defaults to [%{}].
  • variant (:string) - Defaults to "default".
  • js_lib (:string) - JavaScript library used for toggling. Defaults to "alpine_js".
  • open_index (:integer) - Index of item to be open at render. Defaults to nil.
  • Global attributes are accepted.

Slots

  • item (required) - CSS class for parent container. Accepts attributes:
    • heading (:string)