{{ aspExample({ code: "<button type=\"submit\" class=\"button button–start\">Send sign in details</button>", nunjucks: "{{ aspButton({
modifier: \"start\",
type: \"submit\",
text: \"Start button. modifier: start\"
}) }}", title: "", id: "65a92ae12942e", url: "" }) }}

Button with link

{{ aspExample({ code: "", nunjucks: "{{ aspButton({
modifier: \"start\",
href: \"#\",
text: \"Start button as a link. modifier: start\"
}) }}", title: "", id: "66e01a32f16dc", url: "" }) }}

When to use this component

Use the button component to help users carry out an action like starting an application or saving their information.

How it works

Write button text in sentence case, describing the action it performs. For example:

You may need to include more or different words to better describe the action. For example, ‘Send sign in details’.

Align the primary action button to the left edge of your form.

Secondary buttons

Use secondary buttons for secondary calls to action on a page.

Pages with too many calls to action make it hard for users to know what to do next. Before adding lots of secondary buttons, try to simplify the page or break the content down across multiple pages.

{{ aspExample({ code: "<button type=\"submit\" class=\"button button–primary\">Send sign in details</button>", nunjucks: "{{ aspButton({
modifier: \"primary\",
type: \"button\",
text: \"Primary button. modifier: primary\"
}) }}", title: "", id: "65a92ae129483", url: "" }) }}

Warning buttons

Warning buttons are designed to make users think carefully before they use them. They only work if used very sparingly. Most services should not need one.

{{ aspExample({ code: "<button type=\"submit\" class=\"button button–warning\">Send sign in details</button>", nunjucks: "{{ aspButton({
modifier: \"warning\",
type: \"reset\",
text: \"Warning button. modifier: warning\"
}) }}", title: "", id: "65a92ae1294a4", url: "" }) }}

Status of development

The below criteria all need to be met for a component to be considered as fully developed for use within the ASP Digital Design System.


{{ aspTable({
head: [
{ text: 'Development criteria'},
{ text: 'Status'}
],
rows: [
{
cells: [
{ text: 'WCAG 2.2 compliant'},
{ html: '<span class="status">Not started</span>'}
]
},
{
cells: [
{ text: 'WCAG 2.1 compliant'},
{ html: '<span class="status status–green">Completed</span>'}
]
},
{
cells: [
{ text: 'HTML / Nunjucks version'},
{ html: '<span class="status status–green">Completed</span>'}
]
},
{
cells: [
{ text: 'Figma version'},
{ html: '<span class="status status">Not started</span>'}
]
},
{
cells: [
{ text: 'M365 versions'},
{ html: '<span class="status status">Not started</span>'}
]
},
{
cells: [
{ text: 'Documentation'},
{ html: '<span class="status status–yellow">In progress</span>'}
]
}
]
}) }}