BalanceReckon Design System
Foundations

Button

Buttons allow users to perform an action or to navigate to another page / view.

import { ActionButton, DeprecatedButton, DeprecatedIconButton, buttonWeightValues, buttonSizeValues, buttonToneValues } from '@balance-web/button-deprecated';
Loading demo…

The DeprecatedButton package has been deprecated and will be removed in a future version. Use Button instead. There is a migration guide at the bottom of the page.

Button

Size

The Button is available in two sizes, medium is the default.

Loading demo…

Weight

Loading demo…

Tone

The Button has is available in three tones, active is the default.

Loading demo…

Icons

Loading demo…

Disabled

When disabled the button is not interactive to the user.

Loading demo…

Loading

Use the loading property to indicate that an action is in progress. Note that buttons are not interactive whilst loading.

Loading demo…

Block

Use the block property to make the button fill its container.

Loading demo…

This is more commonly achieved by wrapping multiple buttons with the Stack component, which will automatically make the buttons fill their container.

Loading demo…

IconButton

The icon button variant shares its rules regarding weight, size and tone with the standard button. For brevity we won't duplicate them here; refer to the above documentation where applicable.

Required props

The IconButton requires an icon property, which must be a component from the icon package.

A label is required to support accessibility. Describe the action or effect that will take place when the button is clicked.

Loading demo…

Size

The IconButton is available in two sizes, medium is the default.

Loading demo…

Weight

The IconButton is available in three weights, bold is the default.

Loading demo…

Disabled

When disabled the button will not be interactive to the user.

Loading demo…

Tone

The IconButton is available in three tones, active is the default.

Loading demo…

ActionButton

Loading demo…

Weight

Loading demo…

Icons

Action buttons accept icons before and after the label.

Loading demo…

Children

Provide arbitrary element(s) to the button. The icon* and label properties will no-longer apply.

Loading demo…

Icon only action button

We can use the children support to render an icon only action button.

NOTE: You must provide aria-label to the button in order for it to be accessible to screen readers.

Loading demo…

To have a link that looks like a button, use the as prop to render an <a> instead of a <button>.

Loading demo…

Migration guide

Below is a mapping from DeprecatedButton to the new Button component. This mapping is about the tone and weight props on DeprecatedButton to colorScheme and variant props on Button. All other props should behave the same.

If this mapping doesn't cover a particular scenario, talk to a design.

Loading demo…

On this page