SplitButton
API reference and demos for SplitButton.
Import
Section titled “Import”import { SplitButton } from "@flanksource/clicky-ui/components";The props table documents the component-specific surface. Standard DOM attributes inherited from React, such as className, event handlers, and accessibility attributes, may also be accepted when the component’s prop type extends a native element.
| Prop | Type | Default | Description |
|---|---|---|---|
align |
enum |
right |
Horizontal alignment of the menu relative to the trigger. |
className |
string |
— | Classes applied to the wrapper. |
disabled |
boolean |
false |
Disable both halves. |
icon |
string | ComponentClass<any, any> | FunctionComponent<any> |
— | Icon shown before the primary label. |
items* |
DropdownMenuItem[] |
— | Secondary actions listed in the dropdown menu. |
label* |
ReactNode |
— | Content of the primary action button. |
loading |
boolean |
false |
Show a spinner and disable the primary half while pending. |
menuClassName |
string |
— | Classes applied to the floating menu. |
onClick* |
(…) => void |
— | Primary action handler. |
primaryDisabled |
boolean |
false |
Disable only the primary action, leaving the menu reachable — for when the default action does not apply but the secondary ones still do. |
size |
"sm" | "lg" | "default" | "icon" | null |
default |
Size forwarded to both halves. |
title |
string |
— | Browser tooltip / accessible label for the chevron trigger. |
variant |
"default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null |
default |
Variant forwarded to both halves. |