525

Split Button

Allow users to select which action to perform from a list of options.

Installation

Usage

Variants

API Reference

SplitButton.

Root

Allow users to select which action to perform from a list of options.

PropTypeDefault
ref? $bindable
HTMLElement null
children?
Snippet -
orientation?
enum horizontal
value? $bindable
string -
disabled?
boolean false
onclick?
function -
onClickPromise?
function -
onActionSelect?
function -
SplitButton.

Action

A button action. Only the action whose `value` matches the currently selected value is rendered.

PropTypeDefault
ref? $bindable
HTMLElement null
value
string -
children?
Snippet -
onclick?
function -
SplitButton.

Select

Wraps the dropdown primitive and binds its value to the split button root state.

PropTypeDefault
open? $bindable
boolean false
children?
Snippet -
SplitButton.

SelectTrigger

The button that opens the dropdown of available actions.

PropTypeDefault
ref? $bindable
HTMLElement null
children?
Snippet -
SplitButton.

SelectContent

The floating container that holds the dropdown actions.

PropTypeDefault
ref? $bindable
HTMLElement null
children?
Snippet -
SplitButton.

SelectAction

An option in the dropdown. Selecting it updates the active action.

PropTypeDefault
value
string -
children?
Snippet -