Skip to content

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 menuLabel.
  • 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—
menuLabelstring"More actions"

Events

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

Slots

NameScopeDescription
default—

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