SplitButton API
import { SplitButton } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
children | React.ReactNode | |
density | 'compact' | 'default' | 'comfortable' | |
disabled | boolean | |
items | SplitButtonItem[] | |
label | string | |
menuDensity | 'compact' | 'default' | 'airy' | |
menuDescription | string | |
menuHeading | string | |
menuLabel | string | |
menuShape | 'default' | 'flat' | 'soft' | 'square' | |
onPrimaryAction | () => void | |
onSelect | (detail: { index: number; value?: string; label?: string }) => void | |
shape | 'default' | 'square' | |
variant | 'primary' | 'neutral' | 'flat' | 'contrast' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-split-button>
SplitButton renders the ui-split-button custom element from @editora/ui-core, which can also be used without React.
Attributes: density, disabled, label, menu-density, menu-description, menu-heading, menu-label, menu-shape, open, variant
Events: primary-action, select