Modal dialogue (experimental) example
With data attributes
How it looks
(preview)
How to call this example
<%= render "govuk_publishing_components/components/button", {
text: "Open modal with data attributes",
data_attributes: {
toggle: "modal",
target: "modal-with-data-attributes"
}
} %>
<%= render "govuk_publishing_components/components/modal_dialogue", {
id: "modal-with-data-attributes",
data_attributes: {
gtm: "modal"
}
} do %>
<h1 class="govuk-heading-l">Modal title</h1>
<p class="govuk-body">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed imperdiet fringilla dictum. Morbi at vehicula augue. Pellentesque varius orci et augue pellentesque, sed elementum massa posuere. Curabitur egestas consectetur arcu, in porta lorem sagittis eu. Nulla facilisi. Sed scelerisque ligula lectus. Nulla et ligula a eros laoreet lacinia nec et ipsum. Ut sagittis sapien est, ut blandit risus laoreet at. Vestibulum vitae erat sed dolor ultricies efficitur.</p>
<% end %>