Buttons

Button is used to trigger an action.

In Bridge, we have 3 types of buttons.

  • Primary: filled in button
  • Secondary: outline button
  • Tertiary: link button (use <Link as="button"/>)

For special cases, if you want to use href, you may do <Button as="a" href="#"/>. This will make the Button an anchor tag.

For information on Button style and usage guidelines, check out Button Design Guidelines.

Color Variants

Sizing

There are three sizes of buttons: large, medium, small. Default is medium.

Button Groups

When using multiple buttons side by side, you can use <Button.Group>. This will add the correct 20px margin between buttons. ButtonBox has same props as Box

Common Props

Button includes COMMON props. Read Common Props for details and API. These common props will override component props such as the color.

Component Props

Note: ButtonBox has same props as Box

Prop nameTypeDefaultDescription
asStringbuttonsets the HTML tag for the component
variantString'primary'color variant (primary | secondary | success | error | warning | white)
disabledBooleanfalsedisable button
outlineBooleanfalseoutline button - secondary button
onClickFuncnullprop function to handle onClick
classNameString''classNames to override styling for button
typeString'medium'size of button (large | medium | small)
themeObjectBridge Themeuse to override default bridge theme