Executes a selected action with a separate dropdown for switching actions. Choosing a menu option updates the main button without executing anything. Arrow keys navigate the menu, typing finds a choice, and Escape closes it.
<SplitButton options={[{ value: 'draft', label: 'Save draft' }, { value: 'publish', label: 'Publish' }]} defaultValue="draft" onAction={save}/> Copy
<SplitButton options={[{ value: 'draft', label: 'Save draft' }, { value: 'publish', label: 'Publish' }]} defaultValue="draft" onAction={save}/>
Executes a selected action with a separate dropdown for switching actions. Choosing a menu option updates the main button without executing anything. Arrow keys navigate the menu, typing finds a choice, and Escape closes it.