Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

SplitButton

Publish now or choose an alternative deployment action.

Preview

Live preview

Changes apply to this preview only.

last action: none

The primary button publishes immediately; the chevron opens the secondary actions.

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Variants, appearances and sizes

Both segments share the same semantic variant, appearance and size.

Open preview

Menu content

Items support a decorative icon, a keyboard shortcut hint and a disabled state.

Open preview

States

disabled turns off the primary action and the menu together; menu items can be disabled individually.

Open preview

Usage

Keep the primary action predictable and put secondary choices in the associated menu.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluSplitButtonItem

Type source
PimoluSplitButtonItem public API
NameTypeDefaultDescription
idRequiredstring—Stable identity used as the menu item key.
labelRequiredstring—Visible label of the menu action.
onSelect(() => void) | undefined—Called when the action is selected; the menu then closes.
disabledboolean | undefinedfalsePublic Pimolu prop; see the source declaration for details.
iconReactNode—Decorative icon rendered before the label.
shortcutstring | undefined—Optional keyboard shortcut hint, e.g. "⌘D".
idRequired

string

No default extracted.

Stable identity used as the menu item key.

labelRequired

string

No default extracted.

Visible label of the menu action.

onSelect

(() => void) | undefined

No default extracted.

Called when the action is selected; the menu then closes.

disabled

boolean | undefined

Default: false

Public Pimolu prop; see the source declaration for details.

icon

ReactNode

No default extracted.

Decorative icon rendered before the label.

shortcut

string | undefined

No default extracted.

Optional keyboard shortcut hint, e.g. "⌘D".

PimoluSplitButtonProps

Type source
PimoluSplitButtonProps public API
NameTypeDefaultDescription
childrenReactNode—Content of the primary action. Takes precedence over `label`.
labelReactNode—Fallback content of the primary action.
onClickMouseEventHandler<HTMLButtonElement> | undefined—Primary action handler.
itemsRequiredPimoluSplitButtonItem[]—Actions listed in the attached menu.
variant"primary" | "secondary" | "neutral" | "success" | "warning" | "danger" | undefinedthe Button default ("primary")Button semantic variant. Defaults to the Button default ("primary").
appearance"solid" | "soft" | "outline" | "ghost" | "link" | "dashed" | "glass" | "elevated" | "glow" | "text" | undefinedthe Button default ("solid")Button appearance. Defaults to the Button default ("solid").
size"xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefinedthe Button default ("md")Button size. Defaults to the Button default ("md").
disabledboolean | undefinedfalseDisables both the primary action and the menu trigger.
menuLabelstring | undefined"More actions"Accessible name of the menu trigger. Defaults to "More actions".
align"start" | "end" | undefined"end"Horizontal alignment of the menu panel. Defaults to "end".
aria-labelstring | undefined—Accessible name of the wrapping group.
classNamestring | undefined—Public Pimolu prop; see the source declaration for details.
menuIconReactNode—Replace the default chevron of the menu trigger.
children

ReactNode

No default extracted.

Content of the primary action. Takes precedence over `label`.

label

ReactNode

No default extracted.

Fallback content of the primary action.

onClick

MouseEventHandler<HTMLButtonElement> | undefined

No default extracted.

Primary action handler.

itemsRequired

PimoluSplitButtonItem[]

No default extracted.

Actions listed in the attached menu.

variant

"primary" | "secondary" | "neutral" | "success" | "warning" | "danger" | undefined

Default: the Button default ("primary")

Button semantic variant. Defaults to the Button default ("primary").

appearance

"solid" | "soft" | "outline" | "ghost" | "link" | "dashed" | "glass" | "elevated" | "glow" | "text" | undefined

Default: the Button default ("solid")

Button appearance. Defaults to the Button default ("solid").

size

"xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined

Default: the Button default ("md")

Button size. Defaults to the Button default ("md").

disabled

boolean | undefined

Default: false

Disables both the primary action and the menu trigger.

menuLabel

string | undefined

Default: "More actions"

Accessible name of the menu trigger. Defaults to "More actions".

align

"start" | "end" | undefined

Default: "end"

Horizontal alignment of the menu panel. Defaults to "end".

aria-label

string | undefined

No default extracted.

Accessible name of the wrapping group.

className

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

menuIcon

ReactNode

No default extracted.

Replace the default chevron of the menu trigger.

Accessibility

  • Name both the main action and the menu trigger; verify Escape returns focus.
Read the accessibility guide →