Skip to content
angulux
@anguless/angulux/splitbutton

SplitButton

1 declaration3 demossplitbutton.md
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" expandAriaLabel="More actions" />

Severity

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

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

Styles

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

<agl-splitButton label="Outlined" [model]="items" expandAriaLabel="More actions" [outlined]="true" /><agl-splitButton label="Text" [model]="items" expandAriaLabel="More actions" [text]="true" /><agl-splitButton label="Raised" [model]="items" expandAriaLabel="More actions" [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. Keys become attributes, and a key that names a DOM property is also assigned to that property. Values the browser would execute go through Angular's sanitizer first, as in a template binding: markup in `innerHTML`, `outerHTML` and `srcdoc`, and URLs in `href`, `src`, `action`, `formaction` and `xlink:href`. To write one of those unsanitized on purpose, pass a `DomSanitizer.bypassSecurityTrustHtml` or `bypassSecurityTrustUrl` value. An `on*` key must be a function, and any other value for it is ignored. Keys themselves are applied as given, so let data from users choose values, never keys.
ptOptionsPassThroughOptions | undefined undefined Used to configure passthrough(pt) options of the component.