Skip to content
angulux
@anguless/angulux/splitbutton

splitbutton

1 declarations3 demos
import
import { SplitButtonModule } from '@anguless/angulux/splitbutton';

Basic

A split button pairs a default action with a menu of the rest.

<agl-splitButton label="Save" [model]="items" />

Severity

Severity defines the colour, exactly as it does for Button.

<agl-splitButton label="Save" [model]="items" /><agl-splitButton label="Success" [model]="items" severity="success" /><agl-splitButton label="Warn" [model]="items" severity="warn" /><agl-splitButton label="Danger" [model]="items" severity="danger" />

Styles

Outlined, text and raised are the same style switches Button has.

<agl-splitButton label="Outlined" [model]="items" [outlined]="true" /><agl-splitButton label="Text" [model]="items" [text]="true" /><agl-splitButton label="Raised" [model]="items" [raised]="true" />

API

Generated from the committed corpus, which check:corpus holds to the built library.

SplitButton

componentagl-splitbutton, agl-splitButton, agl-split-button

SplitButton groups a set of commands in an overlay with a default command.

InputTypeDefaultDescription
modelMenuItem[] | undefinednot documentedMenuModel instance to define the overlay items.
severity'success' | 'info' | 'warn' | 'danger' | 'help' | 'primary' | 'secondary' | 'contrast' | null | undefinednot documentedDefines the style of the button.
raisedbooleannot documentedAdd a shadow to indicate elevation.
roundedbooleannot documentedAdd a circular border radius to the button.
textbooleannot documentedAdd a textual class to the button without a background initially.
outlinedbooleannot documentedAdd a border class without a background initially.
size'small' | 'large' | undefined | nullnot documentedDefines the size of the button.
plainbooleannot documentedAdd a plain textual class to the button without a background initially.
iconstring | undefinednot documentedName of the icon.
iconPosSplitButtonIconPositionnot documentedPosition of the icon.
labelstring | undefinednot documentedText of the button.
tooltipstring | undefinednot documentedTooltip for the main button.
tooltipOptionsTooltipOptions | undefinednot documentedTooltip options for the main button.
styleClass
deprecated — since v20.0.0, use `class` instead.
string | undefinednot documentedClass of the element.
menuStyle{ [klass: string]: any } | null | undefinednot documentedInline style of the overlay menu.
menuStyleClassstring | undefinednot documentedStyle class of the overlay menu.
dropdownIconstring | undefinednot documentedName of the dropdown icon.
appendToHTMLElement | ElementRef | TemplateRef<any> | 'self' | 'body' | null | undefined | any 'body' Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name).
dirstring | undefinednot documentedIndicates the direction of the element.
expandAriaLabelstring | undefinednot documentedDefines a string that labels the expand button for accessibility.
showTransitionOptions
deprecated — since v21.0.0. Use `motionOptions` instead.
stringnot documentedTransition options of the show animation.
hideTransitionOptions
deprecated — since v21.0.0. Use `motionOptions` instead.
stringnot documentedTransition options of the hide animation.
motionOptionsMotionOptions | undefinednot documentedThe motion options.
buttonPropsButtonProps | undefinednot documentedButton Props
menuButtonPropsMenuButtonProps | undefinednot documentedMenu Button Props
autofocusboolean | undefinednot documentedWhen present, it specifies that the component should automatically get focus on load.
disablednot documentedWhen present, it specifies that the element should be disabled.
tabindexnumber | undefinednot documentedIndex of the element in tabbing order.
menuButtonDisabledbooleannot documentedWhen present, it specifies that the menu button element should be disabled.
buttonDisabledbooleannot documentedWhen present, it specifies that the button element should be disabled.
OutputTypeDescription
onClickEventEmitter<MouseEvent>Callback to invoke when default command button is clicked.
onMenuHideEventEmitter<any>Callback to invoke when overlay menu is hidden.
onMenuShowEventEmitter<any>Callback to invoke when overlay menu is shown.
onDropdownClickEventEmitter<MouseEvent>Callback to invoke when dropdown button is clicked.
Template slotDescription
<ng-template #content>Custom content template.
<ng-template #dropdownicon>Custom dropdown icon template.

Inherited from BaseComponent

inherited
InputTypeDefaultDescription
dtObject | undefined undefined Defines scoped design tokens of the component.
unstyledboolean | undefined undefined Indicates whether the component should be rendered without styles.
ptPT | undefined undefined Used to pass attributes to DOM elements inside the component. TRUSTED INPUT ONLY. Whatever you put here is applied to the DOM as given: keys become attributes, and a key that names a DOM property is assigned to that property directly, with no sanitizer in between. That is what makes the API useful, and it means a value reaching it from a user, a database or a CMS can execute script. Treat it like markup you wrote yourself, not like data you received.
ptOptionsPassThroughOptions | undefined undefined Used to configure passthrough(pt) options of the component.