Split button allows users to have a primary action along with the option to choose from a list of nested related secondary actions.
| Name | Description | Default |
|---|---|---|
| labelOverrides | Overrides for labels that have been defaulted in the component. SplitButtonLabelOverrides | - |
| variant | Determines the style of the button. "primary" | "secondary" | primary |
| disabled | @deprecated use The All DLS components are designed to use the boolean | - |
| aria-disabled | If true, styles component as disabled and prevents interactivity. Screen reader reads as "dimmed" or "disabled". Booleanish | - |
| label* | The text content to associate with the main action. Also used as the default
accessible label for the string | - |
| id* | Unique identifier for the string | - |
| children* | The nested actions to include. Must be an instance of ReactElement<any, string | JSXElementConstructor<any>> | ReactElement<any, string | JSXElementConstructor<any>>[] | - |
| onClick | The event handler for click events on button, disabled for disabled buttons MouseEventHandler<HTMLButtonElement> | - |
| isLoading | If true, shows loading button with spinner boolean | - |
| iconPosition | Place icon before or after text "start" | "end" | - |
| icon | Custom icon displayed in notification ReactNode | - |
| reactlytics | ReactlyticsProp | - |
| groupScreenReaderLabel | The accessible label for the string | - |
| defaultIsOpen | Determines if the split button is open by default (uncontrolled mode). boolean | - |
| isOpen | Determines if the split button is currently open (controlled mode). boolean | - |
| onIsOpenChange | A callback for when the open state is changed (controlled mode). ((isOpen: boolean) => void) | - |
| menuProps | Props to spread onto Menu component Omit<MenuProps, "disabled" | "aria-disabled" | "label" | "id" | "children" | "defaultIsOpen" | "isOpen" | "onIsOpenChange" | "customTrigger"> | - |
| Name | Description | Default |
|---|---|---|
| disabled | @deprecated use The All DLS components are designed to use the boolean | - |
| aria-disabled | If true, styles component as disabled and prevents interactivity. Screen reader reads as "dimmed" or "disabled". Booleanish | - |
| children* | Child elements of the MenuItem, typically text content ReactNode | - |
| onClick | Callback function to be called when the MenuItem is clicked MouseEventHandler<HTMLButtonElement> | - |
| reactlytics | ReactlyticsProp | - |
| icon | Icon to be displayed for the MenuItem ReactElement<any, string | JSXElementConstructor<any>> | - |
Connect with the DLS Team on Slack or by email.
Check out additional resources.