Skip to main content
/
/
/
Button

Button

For click events

Basic button

Also see the <Button> React component

The .bf-button will apply bifrost button styling:

The .bf-button class, and all the combinations below can also be applied to <a> elements.

Filled and flat variants

Another two alternative button variants are supplied:

State colors

Another three alternative button variants are supplied:

Combine variants and states

statevariant
default
inactive
neutral
alert
inverted

Rounded corners (pill button)

Small size

Button group

Split button

.bf-button-split joins two .bf-button elements into one control: a primary action and a trigger for a menu of related actions. It only handles the visual join, so apply the same variant, state and size classes to both buttons. The trigger has no visible text, so give it an aria-label.

Filled buttons have no border, so a 1px gap separates the two halves.

.bf-button-split does not open a menu by itself. Use a dropdown anchored to the trigger, and set aria-expanded on the trigger to reflect whether the menu is open.

Expand button

Control open state by toggling the .bf-expand-icon-open class on the icon.

A note about type

The default type of a <button> is submit. Unless you need the button to submit a <form> you probably want <button type='button'> instead.

HTML
<form>
  <button>this button will submit the form</button>
  <button type="button">this will not (use js to handle clicks)</button>
</form>