Puts the component into a disabled state, which prevents user interaction.
expanded
?: boolean = $bindable(false)
Whether the menu is open. This property is bindable.
href
?: string = undefined
Makes the component navigational, typically used for links to set the URL or route it should navigate to.
icon
?: QBtnIcon = undefined
Icon to display on the leading edge of the button.
label
?: string = undefined
Text for the primary action. Menu content is supplied through children.
loading
?: boolean = false
Puts the button in a loading state, adding a loader as the leading icon.
menuLabel
: string = undefined
Accessible name for the menu button, such as "More send options".
noRipple
?: boolean = false
Disables the ripple effect on click.
replace
?: boolean = false
Replaces the current entry in the browser's history rather than adding a new one.
This is the same as setting the `data-sveltekit-replacestate` attribute to "true".
rippleColor
?: string = undefined
Sets the ripple effect's color for the component.
If omitted, the ripple will inherit the component's text color.
size
?: QBtnProps["size"] = "sm"
Expressive size, from xs to xl. Defaults to sm (40px minimum height).
For navigational components only, sets or retrieves the window or frame at which to target content.
to
?: string = undefined
Makes the component navigational, typically used for links to set the URL or route it should navigate to.
As it is the same as href, it is recommended to use href instead.
variant
?: Exclude<QBtnVariantOptions, "flat"> = "filled"
Button style. Defaults to filled.
Usage
Primary Action and Menu
The leading button runs the primary onclick action. The trailing button opens
related actions supplied through children. Give that menu a contextual menuLabel. Try printing in color, choosing monochrome, or exporting a PDF.
Choose the main action or a menu alternative.
Variants, Sizes and Icons
QSplitBtn always uses expressive styling. It defaults to filled and sm; both halves share their variant and size. An icon can be an icon name or a snippet. Bind expanded to observe or control the menu.
Custom print icon
Menu: closed.
Choose the main action or a menu alternative.
Opening the menu changes the trailing button's shape and rotates its icon. Large sizes
scroll within this preview. noRipple and rippleColor configure both halves.
Loading and Disabled
loading replaces the leading icon while keeping the menu available. Prevent
duplicate work in your action handlers; this example also disables its print menu item while
loading. disabled disables both halves.
Loading
Disabled
No print requested.
Icon-only Links
Omit label for an icon-only leading button and provide its own aria-label, separately from menuLabel. Use href or to for navigation; its menu actions remain independent.
Use QList with role="presentation" and clickable QItem children with role="menuitem" for keyboard menu navigation.
Tab moves between the two buttons; Space or Enter activates them. Arrow keys navigate menu actions,
selection closes the menu, and Escape dismisses it. The trigger announces its expanded state.
Native attributes and event handlers, including type, name, value and aria-label, apply to the primary button. Use type="submit" for a form action. class, style and dir apply to the container.