Skip to main content
Version: Next

SplitButton API

import { SplitButton } from '@editora/ui-react';

Props​

PropTypeDescription
childrenReact.ReactNode
density'compact' | 'default' | 'comfortable'
disabledboolean
itemsSplitButtonItem[]
labelstring
menuDensity'compact' | 'default' | 'airy'
menuDescriptionstring
menuHeadingstring
menuLabelstring
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