skip to content

Button

Use the <button> element for submitting forms or—in rare cases—triggering JavaScript events such as toggling menus. Use the type="submit" for form submission or type="button" for any other functionality.

If the control redirects the user to a different location (another page or a location in the current page) use the Call-to-action component instead.

Buttons should always use the <button> element, with either the type="button" attribution or type="submit" for forms. For call-to-action links see call-to-action. If you do not use a <button> element, the styles will not be honoured (they are scoped in the selector as button.ds-button).

Only use the blue version as a supplementary option; the pink (default version) should be used where there is only one button in the context.

Light theme

markup demo
<button class="ds-button" type="button">Press me</button>
<button class="ds-button" type="button" disabled>Press me</button>
<button class="ds-button-blue" type="button">Press me</button>
<button class="ds-button-blue" type="button" disabled>Press me</button>

Dark theme

Invoke the dark theme on any component by applying class="ds-dark" to a container element.
markup demo
<button class="ds-button" type="button">Press me</button>
<button class="ds-button" type="button" disabled>Press me</button>
<button class="ds-button-blue" type="button">Press me</button>
<button class="ds-button-blue" type="button" disabled>Press me</button>