Split Button
Split button is used to group related actions, allowing users to perform a main action or choose from a menu of secondary actions.
import { SplitButton } from '@balance-web/split-button';SplitButton
colorScheme, variant, size, disabled, loading
These props are the same as the - Button
button
Used to provide the main action.
It supports all the props a Button does except for colorScheme, variant, size, disabled, loading which are applied to the component as a whole based on the previous section and iconAfter.
menuItems
Used to provide the secondary actions in the form of a menu. It's supposed to be a ReactNode which returns a list of Dropdown.Item. You can use all the props supported by Dropdown.Item such as disabled and href.
You can also use other elements from the dropdown-v2 package such as Dropdown.GroupTitle and Dropdown.Divider.
NOTE: An error will be thrown if there are no
menuItemsprovided. Use aButtoninstead if there are no menu items to be rendered.
align
Which edge of the whole split button the menu lines up with: end (the default) lines up the right edges, start lines up the left edges. Use start when the split button sits at the left edge of its area, so the menu opens to the right and stays clear of the left navigation.