Coming from Orbiter, you should be aware of the following changes:
fluid
has been renamedisFluid
.disabled
has been renamedisDisabled
.
A button group handles the spacing and orientation for a grouping of buttons.
<ButtonGroup> {/* ButtonGroup requires at least two button components */} <Button /> /* A button in the button group */ <LinkButton /> /* A link button in the button group */ </ButtonGroup>
A ButtonGroup
uses the following component.
A button group can render his items vertically.
A button group can change the alignment of his items.
A button group can be disabled.
A button group can be fluid.
A button group can be of different sizes.
You don't necessarily need to use the buttons in the order that their labels imply. For example, you don't always need to use the secondary button as the second button in your layout. The most important thing is to establish a visual hierarchy between the buttons in your interface. Keep these best practices in mind.
As a general rule, a layout should contain a single high-emphasis button that makes it clear that other buttons have less importance in the hierarchy. This high-emphasis button commands the most attention.
A high-emphasis button can be accompanied by medium- and low-emphasis buttons that perform less important actions. Keep in mind that you should only groups together calls to action that have a relationship to one another.
Alignment refers to whether the buttons are aligned to the right or the left of a container or layout. Buttons are unique, more so than any other component, in that their alignment depends on where they appear and whether or not they're contained within another component.
As a general rule, on full-page designs, the primary button is on the right side of the page. When the browser window is large and the user is scrolling to read, it's best to have the primary button where the users's attention has been focused all along. Whereas in wizards, where a user is progressing through a series of steps or modal, the primary action traditionally sits at the bottom right. Buttons within components are also right-aligned.
The axis the ButtonGroup should align with.
Whether the Buttons in the ButtonGroup are all disabled.
Whether the Buttons in the ButtonGroup are all fluid.
The size of the buttons in the ButtonGroup.
Whether elements are forced onto one line or can wrap onto multiple rows.
The alignment of the buttons within the ButtonGroup.
The inline style for the element.
The children of the component.
The CSS className for the element.
A slot name for the component. Slots allow the component to receive props from a parent component.
An explicit null
value indicates that the local props completely override all props received from a parent.
The element's unique identifier. See MDN.
Defines a string value that labels the current element.
Identifies the element (or elements) that labels the current element.
Identifies the element (or elements) that describes the object.
Identifies the element (or elements) that provide a detailed, extended description for the object.
Coming from Orbiter, you should be aware of the following changes:
fluid
has been renamed isFluid
.disabled
has been renamed isDisabled
.