LiveUiKit.UI.Collapse (LiveUIKit v0.1.3)

Collapse is used for toggle showing and hiding content.

Link to this section Summary

Link to this section Functions

Link to this function

collapse(assigns)

Collapse component:

examples

Examples

<button class="btn" phx-click={UI.Collapse.toggle("#collapse-one")}>
  Toggle Collapse
</button>

<.collapse id="collapse-one">
  <.card>
    <.card_body>
      Some placeholder content for the collapse component. This panel
      is hidden by default but revealed when the user activates the relevant trigger.
    </.card_body>
  </.card>
</.collapse>

options

Options

  • extended_class - The class or classes that will be appended to the default class attribute.

All further assigns will be passed to the collapse tag.

Link to this function

toggle(id, js \\ %JS{})