Buttons are one of the most important interactive components that connect & enable user flows. Buttons need to stand out and there can be different types of buttons. By default, button width is kept auto and gets changed as per its content but user can also change it as per the requirement which is shown below in Primary and Outline buttons together section
20px, 16px and 12 px icons can be used with the three sizes for the buttons as shown below.
When buttons resize and if their width increases as per the variations above, the icon and the label spacing remains fixed as seen here and both will remain vertically center aligned.
The width of the primary & secondary buttons vary according to the word it encloses with the padding specs given above, however, there are a few variations. When buttons resize to varying breakpoints, they may adapt to their context. The layout also impacts the placement & alignment along with the width of the button. Key variations are documented as below
The minimum margin around the larger icon buttons should be 20px and 16px for small icon buttons. These can become the padding between two such icon buttons can
Here the buttons are all the same sizes decided by the shared space between columns in the gird system, such that the padding between the buttons is 16px and they occupy 3 columns and comfortably accommodate their labels. The 3 buttons are also aligned differently as the layout and functions. The two buttons on the right hand side expand for smaller breakpoints for the user's ease, giving more area to tap. Here the primary button is on top as it is the more important call to action here.
The content or text on the button should convey clearly where clicking on it would lead the user.Labels should be consist, concise and precise.
There can be use cases where the button color may not stand out or meet permissible color contrast for accessibility. The below options are prescribed for usage on dark or other backgrounds where Color A or Onyx 300 may not be suitable.
There can be use cases where the button color may not stand out or meet permissible color contrast for accessibility. The below options are prescribed for usage on dark or other backgrounds where Color A or Onyx 300 may not be suitable.
Buttons are used to bring the users attention to the element and click-through to the next step or page. Button text should be short and shouldn't be long, spanning over multiple lines; consider using links for these use-case scenarios.
There are a total of 4 different states for each of the buttons. These include:
The examples below that display the states are mainly for content authors to visualize and understand. Each button structure between the themes are the same with the only difference being the classes that are set upon the <button> elements.
The main class for this theme is: .__mst_button
The main class for this theme is: .__mst_button_alt
The main class for this theme is: .__mst_button_campaign