@anguless/angulux/splitbutton
SplitButton
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-buttonSplitButton groups a set of commands in an overlay with a default command.
| Input | Type | Default | Description |
|---|---|---|---|
| model | MenuItem[] | undefined | not documented | MenuModel instance to define the overlay items. |
| severity | 'success' | 'info' | 'warn' | 'danger' | 'help' | 'primary' | 'secondary' | 'contrast' | null | undefined | not documented | Defines the style of the button. |
| raised | boolean | not documented | Add a shadow to indicate elevation. |
| rounded | boolean | not documented | Add a circular border radius to the button. |
| text | boolean | not documented | Add a textual class to the button without a background initially. |
| outlined | boolean | not documented | Add a border class without a background initially. |
| size | 'small' | 'large' | undefined | null | not documented | Defines the size of the button. |
| plain | boolean | not documented | Add a plain textual class to the button without a background initially. |
| icon | string | undefined | not documented | Name of the icon. |
| icon | SplitButtonIconPosition | not documented | Position of the icon. |
| label | string | undefined | not documented | Text of the button. |
| tooltip | string | undefined | not documented | Tooltip for the main button. |
| tooltip | TooltipOptions | undefined | not documented | Tooltip options for the main button. |
| style deprecated — since v20.0.0, use `class` instead. | string | undefined | not documented | Class of the element. |
| menu | { [klass: string]: any } | null | undefined | not documented | Inline style of the overlay menu. |
| menu | string | undefined | not documented | Style class of the overlay menu. |
| dropdown | string | undefined | not documented | Name of the dropdown icon. |
| append | HTMLElement | 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). |
| dir | string | undefined | not documented | Indicates the direction of the element. |
| expand | string | undefined | not documented | Defines a string that labels the expand button for accessibility. |
| show deprecated — since v21.0.0. Use `motionOptions` instead. | string | not documented | Transition options of the show animation. |
| hide deprecated — since v21.0.0. Use `motionOptions` instead. | string | not documented | Transition options of the hide animation. |
| motion | MotionOptions | undefined | not documented | The motion options. |
| button | ButtonProps | undefined | not documented | Button Props |
| menu | MenuButtonProps | undefined | not documented | Menu Button Props |
| autofocus | boolean | undefined | not documented | When present, it specifies that the component should automatically get focus on load. |
| disabled | not documented | When present, it specifies that the element should be disabled. | |
| tabindex | number | undefined | not documented | Index of the element in tabbing order. |
| menu | boolean | not documented | When present, it specifies that the menu button element should be disabled. |
| button | boolean | not documented | When present, it specifies that the button element should be disabled. |
| Output | Type | Description |
|---|---|---|
| on | EventEmitter<MouseEvent> | Callback to invoke when default command button is clicked. |
| on | EventEmitter<any> | Callback to invoke when overlay menu is hidden. |
| on | EventEmitter<any> | Callback to invoke when overlay menu is shown. |
| on | EventEmitter<MouseEvent> | Callback to invoke when dropdown button is clicked. |
| Template slot | Description |
|---|---|
| <ng-template #content> | Custom content template. |
| <ng-template #dropdownicon> | Custom dropdown icon template. |
Inherited from BaseComponent
inherited| Input | Type | Default | Description |
|---|---|---|---|
| dt | Object | undefined | undefined | Defines scoped design tokens of the component. |
| unstyled | boolean | undefined | undefined | Indicates whether the component should be rendered without styles. |
| pt | PT | 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. |
| pt | PassThroughOptions | undefined | undefined | Used to configure passthrough(pt) options of the component. |