View Source DisclosureGroup

<DisclosureGroup>

An expandable section of content.

Overview

Use the content and label children to create a disclosure group.

<DisclosureGroup>
    <Text template={:label}>Edit Actions</Text>
    <Group template={:content}>
        <Button phx-click="arrange">Arrange</Button>
        <Button phx-click="update">Update</Button>
        <Button phx-click="remove">Remove</Button>
    </Group>
</DisclosureGroup>

To synchronize the expansion state with the server, use the isExpanded attribute.

<DisclosureGroup isExpanded={@actions_open} phx-change="actions-group-changed">
    ...
</DisclosureGroup>

Bindings

Children

  • label - Describes the content of the disclosure group.
  • content - The elements below the fold.

References

Synchronizes the expansion state with the server.