1. Government Frontend Component Guide
  2. Button
  3. With js classes
Button example

With js classes

Use js- prefixed classes only as interaction hooks – to query and operate on elements via JavaScript

How it looks

How to call this example

<%= render "govuk_publishing_components/components/button", {
  text: "Button",
  classes: "js-selector-1 js-selector-2"
} %>