ShadcnUI.Components.Disclosure.Accordion (shadcn_ui v1.0.0)

Copy Markdown View Source

Native disclosure items with deterministic caller-owned identity.

Each item renders one details and summary pair. Initial open values are server-rendered snapshots only; browsers own activation and applications own persistence, replacement policy, routing, loading, and analytics.

Summary

Functions

Renders a deterministic collection of native disclosure items.

Functions

accordion(assigns)

Renders a deterministic collection of native disclosure items.

Attributes

  • id (:string) (required)
  • mode (:atom) - Defaults to :independent. Must be one of :independent, or :exclusive.
  • class (:any) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • item (required) - Accepts attributes:
    • key (:string) (required)
    • summary (:string) (required)
    • open (:boolean)
    • class (:any)
    • summary_class (:any)
    • content_class (:any)
    • details_rest (:map)
    • summary_rest (:map)
    • content_rest (:map)