API reference: @salmonui/buttons/menu
SplitButtonPropsinterface
import type { SplitButtonProps } from '@salmonui/buttons/menu';interface SplitButtonProps extends MenuButtonMenuProps, Omit<ButtonBaseProps, 'children' | 'ref' | 'className' | 'style' | 'render' | 'repeat' | 'onRepeat' | 'iconOnly' | 'floating' | 'floatingScope'> {
readonly children?: ReactNode;
readonly menuLabel?: string;
readonly indicator?: ReactNode;
readonly className?: string;
readonly style?: CSSProperties;
readonly classNames?: Partial<Record<SplitButtonPart, string>>;
readonly styles?: Partial<Record<SplitButtonPart, CSSProperties>>;
readonly ref?: Ref<HTMLButtonElement>;
}
| Name | Signature | Description |
|---|---|---|
menuoptionalinherited | menu?: ReactNode; | Menu entries as JSX ( |
itemsoptionalinherited | items?: readonly MenuItemData[]; | Data form of the menu entries. |
renderItemoptionalinherited | renderItem?: ((item: MenuItemData) => ReactNode); | Content of each |
openoptionalinherited | open?: boolean; | |
defaultOpenoptionalinherited | defaultOpen?: boolean; | Applied after hydration (server and client markup stay identical). |
onOpenChangeoptionalinherited | onOpenChange?: ((open: boolean, event: MenuOpenChangeEvent) => void); | |
childrenoptional | readonly children?: ReactNode; | Primary button content (also the group's accessible name). |
menuLabeloptional | readonly menuLabel?: string; | Accessible name of the menu trigger (default |
indicatoroptional | readonly indicator?: ReactNode; | Trigger content (default chevron). |
classNameoptional | readonly className?: string; | Root ( |
styleoptional | readonly style?: CSSProperties; | |
classNamesoptional | readonly classNames?: Partial<Record<SplitButtonPart, string>>; | |
stylesoptional | readonly styles?: Partial<Record<SplitButtonPart, CSSProperties>>; | |
refoptional | readonly ref?: Ref<HTMLButtonElement>; | The primary |
variantoptionalinherited | variant?: ButtonVariant; | Visual weight. Default |
toneoptionalinherited | tone?: ButtonTone; | Color role. Default |
sizeoptionalinherited | size?: ButtonSize; | Metric set. Default |
iconStartoptionalinherited | iconStart?: ReactNode; | Decorative icon before the label (inline-start; follows |
iconEndoptionalinherited | iconEnd?: ReactNode; | Decorative icon after the label (inline-end; follows |
loadingoptionalinherited | loading?: boolean; | Shows a spinner, sets |
loadingLabeloptionalinherited | loadingLabel?: string; | Visually hidden text appended to the name while |
spinneroptionalinherited | spinner?: ReactNode; | Replaces the built-in spinner graphic. |
progressoptionalinherited | progress?: number; | Progress fill from inline-start, 0 to 100. No spinner unless |
progressLabeloptionalinherited | progressLabel?: ((value: number) => string); | Visually hidden progress text appended to the name. Default |
onActionoptionalinherited | onAction?: ((event: MenuActionEvent) => void); | A chosen item (any level); |
placementoptionalinherited | placement?: MenuPlacement; | Default |
containeroptionalinherited | container?: Element | null; | Portal target (default: the trigger's |
submenuOpenoptionalinherited | submenuOpen?: MenuSubmenuOpen; | Submenus open after a pointer rest of |
hoverDelayoptionalinherited | hoverDelay?: number; | Hover intent of submenus in ms (default 200). |