Skip to content
Calm motion: animations on this site only fade, with no movement

SplitButton ​

Button with a menu half

One main action with related variants a click away: Save / Save as…, Merge / Squash. If the choices are equal, use a DropdownMenu or separate buttons.

Basic
  • The main part fires @click. The arrow opens the menu (items, @select) and is named by labels.menu.
  • color, variant, size, disabled and loading apply to both halves.

Usage ​

ts
import { BlessSplitButton } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
label*string—
items*BlessMenuItem[]—
color"text" | "accent" | "danger""text"
variant"solid" | "outline""solid"
size"md" | "sm" | "lg""md"
disabledboolean—
loadingboolean—
labelsPartial<{ menu: string; }>—

Events

NamePayloadDescription
select[item: BlessMenuItem]
click[e: MouseEvent]

Slots

NameScopeDescription
default—

Released under the MIT License. Character names and artwork belong to their owners.