1. Finder Frontend Component Guide
  2. Expander (experimental)
  3. With button data attributes
Expander (experimental) example

With button data attributes

Allows data attributes to be passed to the component to be added to the expand/collapse button. The attributes are written to the parent element then read by the JavaScript and applied to the button. This is used for tracking purposes.

How it looks (preview)

Organisation

Sssh I'm hiding

How to call this example

<%= render "components/expander", {
  title: "Organisation",
  button_data_attributes: {
    ga4_expandable: "",
    ga4_event: {
      event_name: "select_content",
      type: "finder"
    }
  }
} do %>
  Sssh I'm hiding
<% end %>