# SplitButton Events

This article describes the SplitButton events:

* [OnClick](https://www.telerik.com/blazor-ui/documentation/components/splitbutton/events#onclick)
* [OnClose](https://www.telerik.com/blazor-ui/documentation/components/splitbutton/events#onclose)
* [OnOpen](https://www.telerik.com/blazor-ui/documentation/components/splitbutton/events#onopen)

## OnClick

The `OnClick` event fires when the user clicks or taps the primary button or a secondary button. Each SplitButton action can execute a separate `OnClick` handler.

* The event argument type is [`MouseEventArgs`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.web.mouseeventargs).
* The event handler can be synchronous (`void`) or asynchronous (`async Task`).

## OnClose

The `OnClose` event fires before the SplitButton popup closes. Set the `IsCancelled` property of the `SplitButtonCloseEventArgs` argument to `true` to keep the popup open.

The event fires for user interaction and when calling `CloseAsync()`. It does not fire when the popup is already closed.

## OnOpen

The `OnOpen` event fires before the SplitButton popup opens. Set the `IsCancelled` property of the `SplitButtonOpenEventArgs` argument to `true` to keep the popup closed.

The event fires for user interaction and when calling `OpenAsync()`. It does not fire when the popup is already open.

## Example

> caption Handling the SplitButton events

<demo metaUrl="client/splitbutton/events/example-1/" height="420"></demo>

## Next Steps

* [Add SplitButton Icons](https://www.telerik.com/blazor-ui/documentation/components/splitbutton/icons)
* [Configure the SplitButton appearance](https://www.telerik.com/blazor-ui/documentation/components/splitbutton/appearance)

## See Also

* [SplitButton API](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.teleriksplitbutton)
* [Live Demo: SplitButton](https://demos.telerik.com/blazor-ui/splitbutton/overview)
