Buttons

The btn classes and react-widgets are deprecated, use fun-button instead.

Buttons trigger actions in the application by being clicked or tapped by the user.

Do

Do use buttons for actions like ‘Edit’, ‘Save’, ‘Run’.

Don't

Do not use links for actions. Links are only for navigation.

Avoid

Avoid using buttons for navigation, prefer links styled as buttons instead, as these preserve standard browser behaviour like cmd+click and right-click.

Button types

Primary buttons

A “Primary” button should be used for the primary action on a page or dialog.

Secondary buttons

A “Secondary” button should be used for other major actions.

Flat buttons

“Flat” buttons can be used for minor actions instead of “Secondary” buttons, where a secondary button would be too ‘noisy’ or repetitive.

Flat buttons must follow the same rules as secondary buttons.

Icon buttons

Icon buttons can be used in lists and other places where a full button would take too much space or be repetitive.

Icon buttons:

Delete button should always open a modal (see modals for how it should look)

List buttons

A less noisy button that works well to have next to icon buttons, for use in lists. Example of usage in table.

List buttons:

Cancel buttons

“Cancel” buttons are to be used in Modals and Edit pages, and nowhere else.

Cancel buttons:

Read more:

Button sizes

Button typeLargeMediumSmallX-small
primary
Secondary
Warning
Flat / tertiary

Button states

Button typeNormalHoverFocusActiveDisabled
Primary
Secondary
Warning
Danger
Success
Flat / tertiary
Flat warning
Flat danger
Cancel button
Icon button

Busy and disabled

If an action takes time, the icon should be switched to a progress spinner and the button should be disabled.

Destructive actions

Search Gunnel

Powered byAlgolia