Button
These examples are used for automated tests and may not follow service manual best practice.
Button default
Code
Markup
<button class="nhsuk-button" data-module="nhsuk-button" type="submit">
Save and continue
</button>
Macro
Button disabled
Code
Markup
<button class="nhsuk-button" data-module="nhsuk-button" type="submit" disabled aria-disabled="true">
Disabled button
</button>
Macro
Button disabled, small
Code
Markup
<button class="nhsuk-button nhsuk-button--small" data-module="nhsuk-button" type="submit" disabled aria-disabled="true">
Disabled button
</button>
Macro
Button login
Code
Markup
<button class="nhsuk-button nhsuk-button--login" data-module="nhsuk-button" type="submit">
Continue
</button>
Macro
Code
Markup
<a class="nhsuk-button nhsuk-button--login" data-module="nhsuk-button" href="#" role="button" draggable="false">
Continue
</a>
Macro
Button login as a link, small
Open this example in a new tab: Button login as a link, small
ContinueCode
Markup
<a class="nhsuk-button nhsuk-button--login nhsuk-button--small" data-module="nhsuk-button" href="#" role="button" draggable="false">
Continue
</a>
Macro
Button login disabled
Code
Markup
<button class="nhsuk-button nhsuk-button--login" data-module="nhsuk-button" type="submit" disabled aria-disabled="true">
Continue
</button>
Macro
Button login disabled, small
Open this example in a new tab: Button login disabled, small
Code
Markup
<button class="nhsuk-button nhsuk-button--login nhsuk-button--small" data-module="nhsuk-button" type="submit" disabled aria-disabled="true">
Continue
</button>
Macro
Button login, small
Code
Markup
<button class="nhsuk-button nhsuk-button--login nhsuk-button--small" data-module="nhsuk-button" type="submit">
Continue
</button>
Macro
Button reverse
Code
Markup
<button class="nhsuk-button nhsuk-button--reverse" data-module="nhsuk-button" type="submit">
Log out
</button>
Macro
Code
Markup
<a class="nhsuk-button nhsuk-button--reverse" data-module="nhsuk-button" href="#" role="button" draggable="false">
Log out
</a>
Macro
Button reverse as a link, small
Open this example in a new tab: Button reverse as a link, small
Log outCode
Markup
<a class="nhsuk-button nhsuk-button--reverse nhsuk-button--small" data-module="nhsuk-button" href="#" role="button" draggable="false">
Log out
</a>
Macro
Button reverse disabled
Code
Markup
<button class="nhsuk-button nhsuk-button--reverse" data-module="nhsuk-button" type="submit" disabled aria-disabled="true">
Log out
</button>
Macro
Button reverse disabled, small
Open this example in a new tab: Button reverse disabled, small
Code
Markup
<button class="nhsuk-button nhsuk-button--reverse nhsuk-button--small" data-module="nhsuk-button" type="submit" disabled aria-disabled="true">
Log out
</button>
Macro
Button reverse, small
Code
Markup
<button class="nhsuk-button nhsuk-button--reverse nhsuk-button--small" data-module="nhsuk-button" type="submit">
Log out
</button>
Macro
Button secondary
Code
Markup
<button class="nhsuk-button nhsuk-button--secondary" data-module="nhsuk-button" type="submit">
Find my location
</button>
Macro
Button secondary as a link
Open this example in a new tab: Button secondary as a link
Find my locationCode
Markup
<a class="nhsuk-button nhsuk-button--secondary" data-module="nhsuk-button" href="#" role="button" draggable="false">
Find my location
</a>
Macro
Button secondary as a link, small
Open this example in a new tab: Button secondary as a link, small
Find my locationCode
Markup
<a class="nhsuk-button nhsuk-button--secondary nhsuk-button--small" data-module="nhsuk-button" href="#" role="button" draggable="false">
Find my location
</a>
Macro
Button secondary disabled
Code
Markup
<button class="nhsuk-button nhsuk-button--secondary" data-module="nhsuk-button" type="submit" disabled aria-disabled="true">
Find my location
</button>
Macro
Button secondary disabled, small
Open this example in a new tab: Button secondary disabled, small
Code
Markup
<button class="nhsuk-button nhsuk-button--secondary nhsuk-button--small" data-module="nhsuk-button" type="submit" disabled aria-disabled="true">
Find my location
</button>
Macro
Button secondary, small
Code
Markup
<button class="nhsuk-button nhsuk-button--secondary nhsuk-button--small" data-module="nhsuk-button" type="submit">
Find my location
</button>
Macro
Button secondary, solid background
Open this example in a new tab: Button secondary, solid background
Code
Markup
<button class="nhsuk-button nhsuk-button--secondary-solid" data-module="nhsuk-button" type="submit">
Find my location
</button>
Macro
Button secondary, solid background as a link
Open this example in a new tab: Button secondary, solid background as a link
Find my locationCode
Markup
<a class="nhsuk-button nhsuk-button--secondary-solid" data-module="nhsuk-button" href="#" role="button" draggable="false">
Find my location
</a>
Macro
Button secondary, solid background as a link, small
Open this example in a new tab: Button secondary, solid background as a link, small
Find my locationCode
Markup
<a class="nhsuk-button nhsuk-button--secondary-solid nhsuk-button--small" data-module="nhsuk-button" href="#" role="button" draggable="false">
Find my location
</a>
Macro
Button secondary, solid background disabled
Open this example in a new tab: Button secondary, solid background disabled
Code
Markup
<button class="nhsuk-button nhsuk-button--secondary-solid" data-module="nhsuk-button" type="submit" disabled aria-disabled="true">
Find my location
</button>
Macro
Button secondary, solid background disabled, small
Open this example in a new tab: Button secondary, solid background disabled, small
Code
Markup
<button class="nhsuk-button nhsuk-button--secondary-solid nhsuk-button--small" data-module="nhsuk-button" type="submit" disabled aria-disabled="true">
Find my location
</button>
Macro
Button secondary, solid background, small
Open this example in a new tab: Button secondary, solid background, small
Code
Markup
<button class="nhsuk-button nhsuk-button--secondary-solid nhsuk-button--small" data-module="nhsuk-button" type="submit">
Find my location
</button>
Macro
Button default, small
Code
Markup
<button class="nhsuk-button nhsuk-button--small" data-module="nhsuk-button" type="submit">
Save and continue
</button>
Macro
Button warning
Code
Markup
<button class="nhsuk-button nhsuk-button--warning" data-module="nhsuk-button" type="submit">
Yes, delete this vaccine
</button>
Macro
Button warning as a link
Open this example in a new tab: Button warning as a link
Yes, delete this vaccineCode
Markup
<a class="nhsuk-button nhsuk-button--warning" data-module="nhsuk-button" href="#" role="button" draggable="false">
Yes, delete this vaccine
</a>
Macro
Button warning as a link, small
Open this example in a new tab: Button warning as a link, small
Yes, delete this vaccineCode
Markup
<a class="nhsuk-button nhsuk-button--warning nhsuk-button--small" data-module="nhsuk-button" href="#" role="button" draggable="false">
Yes, delete this vaccine
</a>
Macro
Button warning disabled
Code
Markup
<button class="nhsuk-button nhsuk-button--warning" data-module="nhsuk-button" type="submit" disabled aria-disabled="true">
Yes, delete this vaccine
</button>
Macro
Button warning disabled, small
Open this example in a new tab: Button warning disabled, small
Code
Markup
<button class="nhsuk-button nhsuk-button--warning nhsuk-button--small" data-module="nhsuk-button" type="submit" disabled aria-disabled="true">
Yes, delete this vaccine
</button>
Macro
Button warning, small
Code
Markup
<button class="nhsuk-button nhsuk-button--warning nhsuk-button--small" data-module="nhsuk-button" type="submit">
Yes, delete this vaccine
</button>
Macro
Button with double click not prevented
Open this example in a new tab: Button with double click not prevented
Code
Markup
<button class="nhsuk-button" data-module="nhsuk-button" data-prevent-double-click="false" type="submit">
Save and continue
</button>
Macro
Button with double click prevented
Open this example in a new tab: Button with double click prevented
Code
Markup
<button class="nhsuk-button" data-module="nhsuk-button" data-prevent-double-click="true" type="submit">
Save and continue
</button>
Macro
Code
Markup
<a class="nhsuk-button" data-module="nhsuk-button" href="#" role="button" draggable="false">
Link button
</a>
Macro
Code
Markup
<a class="nhsuk-button nhsuk-button--small" data-module="nhsuk-button" href="#" role="button" draggable="false">
Link button
</a>