Buttons
Buttons are simple components that perform a certain action when clicked. They can be used for navigation between pages or executing JavaScript in the same page.
Please note that the elements presented in this page are using the default color scheme and font pair.
Usage
To create a button, simply add the class of button
to an anchor, button or input type submit/button tag. All the options below are valid.
Code | Preview |
---|---|
|
Anchor tag |
Note: Because of their nature, buttons that are not generated from an anchor tag treat fonts differently so there is a slight height variations between them.
Button types & sizes
There are 4 button types:
Type | Code & preview |
---|---|
Default |
|
Ghost |
|
Pill |
|
Secondary |
|
Helper classes
Here's a list of the available helper classes that can be applied to buttons.
Class | Description | Code & preview |
---|---|---|
full-width |
Makes a button occupy the entire available horizontal space. |
|
scroll-down-button |
Adds a large margin-top and removes margin-bottom. This is meant to be used on the small circle buttons like the ones in the hero of demo-4. |
|
button-group |
This class cannot be applied to a button. Instead, apply it to a parent element when you want to display 2 or more buttons on the same line. |
|