React Split Button

The React Split Button is a graphical user interface component that displays Split Button with visual severity levels. It differentiates Buttons with icons and colors to denote the importance and context of the Button. It has several built-in features, such as severities, variants, icons, and a template.

Getting started

To create a new Vite project, refer to the Vite documentation. Once that Vite project is ready to run with default settings, let’s add the React Split Button component to the project.

Adding Syncfusion® packages

To use the Split Button component, install the @syncfusion/react-splitbuttons package:

Adding CSS Reference

Import the Split Button component’s required CSS references as follows in src/App.css.

Adding Split Button component

To include the Split Button component in your application, import the Split Button from @syncfusion/react-splitbuttons package in App.tsx.

Add the Split Button component in application as shown in below code example.

Run the project

To run the project, use the following command:

This section outlines the functionality of Split Button, comparing them to Split Button as essential UI components for selecting options in forms and settings menus.

Disabled

The disabled section shows how the Split Button behaves or can be set up when it shouldn't be interactive, demonstrating different states within the interface.

Icons

This part explores the capability to include icons within the Split Button, adding a layer of visual communication to the component to better signal its purpose or function.

Variants

The Split Button component has three distinct variants : standard, outlined and filled.

Size

Easily customize the Split Button's size to match your design requirements using its built-in sizing properties.

Customization

Customize the Split Button by adding icons and separators, turning items into links, or applying a custom design to the dropdown menu.

Accessibility

The Split Button component followed the accessibility guidelines and standards, including ADA, Section 508, WCAG 2.2 standards, and WCAG roles that are commonly used to evaluate accessibility.

The accessibility compliance for the Split Button component is outlined below.

Accessibility CriteriaCompatibility
WCAG 2.2 Support
Section 508 Support
Screen Reader Support
Right-To-Left Support
Color Contrast
Mobile Device Support
Keyboard Navigation Support
Accessibility Validation

- All features of the component meet the requirement.

- Some features of the component do not meet the requirement.

- The component does not meet the requirement.

WAI-ARIA attributes

The Split Button component followed the WAI-ARIA patterns to meet the accessibility. The following ARIA attributes are used in the Splitbutton component:

AttributesPurpose
roleIndicates the Split Button component as button, Split Button popup as menu, and the Split Button popup action items as menuitem.
aria-haspopupIndicates the availability and type of interactive Split Button popup element.
aria-expandedIndicates whether the Split Button popup can be expanded or collapsed, as well as indicates whether its current state is expanded or collapsed.
aria-disabledIndicates that the element is perceivable but disabled, so it is not editable or otherwise operable.

Keyboard interaction

The Split Button component followed the keyboard interaction guideline, making it easy for people who use assistive technologies (AT) and those who completely rely on keyboard navigation. The following keyboard shortcuts are supported by the Splitbutton component.

WindowsMacTo do this
Space , EnterSpace , EnterOpens and closes the popup.
EscEscCloses the opened popup.
Navigates up or to the previous action item.
Navigates down or to the Next action item.