New to Kendo UI for AngularStart a free 30-day trial

Represents the Kendo UI SplitButton component for Angular.

Definition

Package:@progress/kendo-angular-buttons

Selector:kendo-splitbutton

Export Name:Accessible in templates as #kendoSplitButtonInstance="kendoSplitButton"

Syntax:

ts
@Component({
selector: 'my-app',
template: `
 <kendo-splitbutton [data]="items" (buttonClick)="onSplitButtonClick()">Paste</kendo-splitbutton>
`
})

class AppComponent {
  public items: Array<any> = [{
      text: 'Keep Text Only',
      icon: 'clipboard-text',
      click: () => { console.log('Keep Text Only click handler'); }
  }, {
      text: 'Paste as HTML',
      icon: 'clipboard-code'
    }
 ];

  public onSplitButtonClick(dataItem: any): void {
      console.log('Paste');
  }
}

Inputs

Specifies the CSS classes for the button that opens the popup. Supports values compatible with ngClass.

Specifies the name of the font icon displayed on the button that opens the popup.

Default:

'chevron-down'

Specifies the SVGIcon displayed on the button that opens the popup.

Default:

chevronDownIcon

buttonAttributes

{ [key: string]: string }

Sets attributes for the main button.

The CSS classes applied to the main button. Supports the same values as ngClass.

data

any

Sets the data for the SplitButton. Provide the data as an array-like list.

disabled

boolean

Disables the SplitButton when set to true (see example).

Configures the background and border styles of the SplitButton (see example). The default value is set by the Kendo theme.

icon

string

Specifies an icon to display next to the button text (see example).

Default:

''

iconClass

string

Specifies a custom CSS class for the icon displayed next to the button text (see example).

imageUrl

string

Specifies the URL of an image to display next to the button text (see example).

Default:

''

Configures the popup settings of the SplitButton.

Configures the border radius of the SplitButton (see example). The default value is set by the Kendo theme.

Configures the padding of the SplitButton (see example). The default value is set by the Kendo theme.

Default:

undefined

svgIcon

SVGIcon

Specifies an SVGIcon to display next to the button text.

tabIndex

number

Specifies the tabindex of the component.

Default:

0

text

string

Sets the text displayed within the SplitButton.

Default:

''

textField

string

Configures the text field of the button-list popup.

Configures the theme color of the SplitButton. The theme color applies to the background, border, and text (see example). The default value is set by the Kendo theme.

Default:

undefined

type

string

Specifies the type attribute of the main button.

Default:

'button'

Fields

isOpen

boolean

Returns the current open state of the popup.

Specifies a template to customize the content of the items in the drop-down list.

Events

Emits an event when the SplitButton is blurred.

Emits an event when the main button is clicked.

close

EventEmitter​<PreventableEvent>

Emits an event before the popup closes. This event is preventable.

Emits an event when the SplitButton gains focus.

Emits an event when an item in the drop-down list is clicked. The event data contains the clicked item's data.

open

EventEmitter​<PreventableEvent>

Emits an event before the popup opens. This event is preventable.

Methods

Blurs the SplitButton component.

Focuses the SplitButton component.

Toggles the visibility of the popup. If the toggle method is used, the open and close events are not fired.

Parameters:openboolean

The desired state of the popup.