Buttons
The button is one of the most common interface element. It's often used to create call to action on Hubspot. It is also used as the base element of some modules like a pagination.
Base
.c-button
The button component can size and color variants that can be mixed together. You should always include the base class .c-button.
Size variants R
.c-button .c-button--s
.c-button .c-button--m
.c-button .c-button--l
Colors
Default colors
.c-button.c-button .c-button--primary.c-button .c-button--warning.c-button .c-button--primary-warning.c-button .c-button--danger.c-button .c-button--primary-dangerInverse colors
.c-button .c-button--inverse.c-button .c-button--primary-inverseCustomized colors
.c-button c-button--facebookLink style
A link button take the same space as a button but is displayed like a link. It offers a larger tap zone than a hypertext link and is displayed aligned when used next to other buttons.
This is a button This is a link button This is a link button This is a link button
.c-button .c-button--link
States
Disabled
Loading
Icons
Icons can be added before or after the label using the Icon component with and extra c-button__icon class. The variant class c-button--icon-onlymust be added to the button if it contains an icon without label.
Small button always rely on 16px icons set.
Get more help Get more help Get more help
Medium and large buttons rely on 24px icons set.
Get more help Get more help Get more help
Get more help Get more help Get more help
Fluid R
Fluid buttons expand to the width of their container while inline buttons are sized based on their content (default).
.c-button .c-button--fluid
.c-button .c-button--inline
This is a responsive class so you can make the button fluid only for specific screen sizes:
.c-button .c-button--fluid .c-button--inline@medium
With the class c-button--fluid the button will look fluid from small screen. We then add a class c-button--inline@medium to size it back to its natural width (inline-block) on medium and larger screens. Resize your browser window to see the responsiveness.