Skip to content

Buttons

Buttons are meant to make actions easily visible and understandable to the user. The twoday Design System has different button variations which each suit different needs. Buttons include text based and icon only buttons. 

Icons can be added to text-based buttons to make the action easier to understand. Sometimes it can also be beneficial to add icons to make important actions more distinguishable. For an icon button, it is recommended to use well established icons (e.g. delete, save) to communicate its purpose. 

Anatomy

The design system offers three different button sizes: Small 36px, Medium 44px & Large 56px, default being Medium. You can consider which size suits best your product.

As an example, if there are many actions in the same view, small buttons can be used as the standard button size.

By default, button width is defined by the text content, but this can be customized. For example, full width buttons may be used in mobile contexts. 

button-small

Small 36px
button-medium

Medium 44px
button-large

Large 56px

Brand button

Brand button takes the primary color of the product color palette and should be used as the primary “call to action” button inside the product UI. It is reserved for the most crucial action and is typically mandatory or essential. Therefore, you should avoid using multiple primary buttons inside one screen. 

brand-button

Fill button

Fill button is similar to brand variant and it can be used either as a primary or secondary button for the product. This variant is particularly useful as a primary button, if your product does not have a defined brand color.

If used as a secondary button, use this for actions which are not mandatory or essential for the user. Often screens will include multiple secondary buttons alongside one primary button.  

fill-button

Outline button

Outline button should be used as a secondary button for the product. 

outline-button

Text button

Text button should be used as a supplementary / tertiary button meant for actions which are intentionally wanted to be less visible to the user. These kinds of actions include i.e. cancel and dismiss functionalities.

Text buttons should use an accompanying icon to clearly distinguish them from links and other passive text elements. 

supplementary-button

Destructive button

Reserved for destructive actions, or irreversible actions, like delete or remove. 

 

destructive-button

States

Button status helps to provide feedback to the user when they are hovering over, clicking or focusing on a button.

The buttons also communicate whether they are unavailable through loading and disabled states. Focus ring width is always 2px. 

button-states-light
button-states-dark

Principles

  • Buttons should be used to trigger an action. Refrain from using buttons for navigational purposes – use links for this. Examples of actions include: 
    • Beginning a new task 
    • Triggering a function within the same page 
    • Specifying a new or next step in a process 
    • Submitting a form 
  • Button label should describe the action that the button will trigger. 
  • Use different button variations to create visual priority. Define your primary, secondary and supplementary buttons. 

Other best practices

  • Refrain from using too many button styles. Using all available styles can create clutter. 
buttons-do1
buttons-dont1
  • Use your button styles with clear intention. Think through how to arrange your “call to action” button and less important buttons in a specific scenario.  
button-do+dont-1