generated:catalog.entry.split-button.title
generated:catalog.entry.split-button.description
@xngui/components/split-button@xngui/components/split-buttonchrome:demo.section
chrome:demo.preview
import { Component } from '@angular/core';
import { XMenu } from '@xngui/components/menu';
import { XMenuItem } from '@xngui/components/menu-item';
import { XMenuSeparator } from '@xngui/components/menu-separator';
import { XSplitButton } from '@xngui/components/split-button';
import { XIcon } from '@xngui/icons';
@Component({
selector: 'app-example',
imports: [XMenu, XMenuItem, XMenuSeparator, XSplitButton, XIcon],
templateUrl: './split-button.component.html',
})
export class ExampleComponent {
protected onClicked(): void {
// primary action
}
protected onMenuClicked(event: { originalEvent: MouseEvent }): void {
// menu trigger
}
protected onOpened(): void {
// menu opened
}
protected onClosed(): void {
// menu closed
}
protected onFocused(): void {
// focus entered
}
protected onBlurred(): void {
// focus left
}
protected onItemSelected(label: string): void {
// menu item selected
}
}
chrome:demo.events.title
chrome:demo.events.empty
chrome:demo.api.title
x-split-button
chrome:demo.api.col.property
chrome:demo.api.col.type
chrome:demo.api.col.default
chrome:demo.api.col.description
sizeXSize—Visual size tier — falls back to XConfigService when unset.
densityXDensity—Spacing offsets — orthogonal to `size`; falls back to XConfigService when unset.
variantXVariant—Color role for both triggers — falls back to XConfigService when unset.
appearanceXAppearance—Surface treatment for both triggers — falls back to XConfigService when unset.
typeXButtonType'button'Native `type` on the primary trigger.
disabledboolean—Prevents interaction on both triggers.
loadingbooleanfalseShows spinner on the primary trigger and blocks interaction.
closeOnBackdropbooleanfalseDismiss projected `x-menu` on backdrop click — forwarded as `hasBackdrop` when opening.
rippleboolean—Material-style press ripple — falls back to XConfigService when unset.
menuOpenbooleanfalseOne-way `aria-expanded` hint when `[(open)]` is not bound. Prefer `open`; do not bind both.
ariaLabelstring—Accessible name for the `role="group"` host when the label is not obvious.
menuAriaLabelstring—Accessible name for the menu trigger — falls back to the `splitButton.menu` i18n key.