Minimise the number of primary actions on a page, at first glance users should be able to identify where the primary action of the page is.
Ensure links and buttons are being applied semantically - links for links and buttons for buttons. While interactive components within Parsley Design System allow for the visual display to be different to the underlying element use this feature sparingly.
The primary button should stand out more than the secondary and the secondary more than the tertiary.
Use a combination of the primary and secondary buttons where there is a choice and you wish to bias or influence the customer’s decision. For example ‘Apply’ and ‘Cancel’ where you wish the customer to apply.
Use a combination of 2 secondary buttons when you do not want to bias the customer.
Use the tertiary button for less important or common options. For example terms and conditions when applying or agreeing to something.
Use a tertiary button in preference to a secondary button, where the secondary action is destructive and you don't want users to tap it inadvertently
Use buttons to highlight important links. Avoid generic labels such as ‘Click here’.
Use short, meaningful button labels
Use active descriptive verbs for your labels such as ‘Save’ or ‘Continue’.
Use sentence case for all button labels
Forms
When used on a form, display the buttons at the end of the form and aligned to the left, with the primary button first and then the secondary buttons.
When used in a confined space such as a modal, display the buttons on the right, with the primary button on the far right and the secondary or tertiary to the left of the primary.
When used in a true wizard, or scenario where the user is likely to go forwards and backwards, use a primary button on the far right and a secondary back but on the far left.
Tables
Use the small button size for actions within table rows.
Repeated actions in tables should apply the seconday or tertiary styles.
More than two actions can consider a dropdown menu.
Accessibility
Avoid the use of disabled buttons where possible, using validation instead to explain why the action cannot be taken.
Ensure contrast between button label and button background exceeds 4.5 to 1.
Ensure contrast between button background and the surface on which is sits exceeds 4.5 to 1.
Ensure there is a minimum contrast ratio of 3 to 1 between the default state of a button and the focused and hover states.
Provide developers with additional context to generic or repeat labels such as ‘Apply’, to be added in the code.