Components

Button

Buttons start an action. Flint has four: primary, secondary, danger and text.

Example

Light

Dark

When to use

  • Use a button to do something: save, delete, open a dialog, start a flow.
  • Use a link to go somewhere. If it changes the URL, it is a link.

Variants and states

Variant or stateUse
PrimaryThe main action in a view. One per view.
SecondaryEvery other action next to a primary one.
DangerActions that destroy something. Always followed by a confirm step.
TextLow-emphasis actions in dense areas, like table rows and toolbars.

Guidance

Do

One primary button per view. Everything else is secondary or text.

Don't

Line up two primary buttons and make people guess which one matters.

Do

Label with a verb that says what happens: "Save trip", "Delete trip".

Don't

Use "OK" or "Submit". People should know the result before they click.

Do

When a button is disabled, say why next to it.

Don't

Disable a button with no explanation and leave people stuck.