# splitbutton

```ts
import { SplitButtonModule } from '@anguless/angulux/splitbutton';
```

## SplitButton

`agl-splitbutton, agl-splitButton, agl-split-button` — component

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

SplitButton 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. |
| `iconPos` | `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. |
| `tooltipOptions` | `TooltipOptions \| undefined` | _not documented_ | Tooltip options for the main button. |
| `styleClass` | `string \| undefined` | _not documented_ | Class of the element. **Deprecated:** since v20.0.0, use `class` instead. |
| `menuStyle` | `{ [klass: string]: any } \| null \| undefined` | _not documented_ | Inline style of the overlay menu. |
| `menuStyleClass` | `string \| undefined` | _not documented_ | Style class of the overlay menu. |
| `dropdownIcon` | `string \| undefined` | _not documented_ | Name of the dropdown icon. |
| `appendTo` | `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. |
| `expandAriaLabel` | `string \| undefined` | _not documented_ | Defines a string that labels the expand button for accessibility. |
| `showTransitionOptions` | `string` | _not documented_ | Transition options of the show animation. **Deprecated:** since v21.0.0. Use `motionOptions` instead. |
| `hideTransitionOptions` | `string` | _not documented_ | Transition options of the hide animation. **Deprecated:** since v21.0.0. Use `motionOptions` instead. |
| `motionOptions` | `MotionOptions \| undefined` | _not documented_ | The motion options. |
| `buttonProps` | `ButtonProps \| undefined` | _not documented_ | Button Props |
| `menuButtonProps` | `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. |
| `menuButtonDisabled` | `boolean` | _not documented_ | When present, it specifies that the menu button element should be disabled. |
| `buttonDisabled` | `boolean` | _not documented_ | When present, it specifies that the button element should be disabled. |

| Output | Type | Description |
| --- | --- | --- |
| `onClick` | `EventEmitter<MouseEvent>` | Callback to invoke when default command button is clicked. |
| `onMenuHide` | `EventEmitter<any>` | Callback to invoke when overlay menu is hidden. |
| `onMenuShow` | `EventEmitter<any>` | Callback to invoke when overlay menu is shown. |
| `onDropdownClick` | `EventEmitter<MouseEvent>` | Callback to invoke when dropdown button is clicked. |

| Slot | Read as | Description |
| --- | --- | --- |
| `<ng-template #content>` | `contentTemplate` | Custom content template. |
| `<ng-template #dropdownicon>` | `dropdownIconTemplate` | Custom dropdown icon template. |
