# Events

This article showcases the available events in the Telerik Slider component:

* [ValueChanged](https://www.telerik.com/blazor-ui/documentation/components/slider/events#valuechanged)
* [OnChange](https://www.telerik.com/blazor-ui/documentation/components/slider/events#onchange)

## ValueChanged

The `ValueChanged` event fires every time the `Value` parameter changes. This happens when the user:

* clicks on the increase/decrease buttons;
* clicks on the track;
* while dragging the handle;

> tip As of version 2.28.0 of Telerik UI for Blazor, the `ValueChanged` event fires continuously while the user is dragging the handle to ensure updating the value accordingly and deliver live UX. Thus, the component will re-render multiple times during the dragging process. If you want to avoid that, you can handle the [`OnChange`](https://www.telerik.com/blazor-ui/documentation/components/slider/events#onchange) event instead.

> caption Handle the ValueChanged

<demo metaUrl="client/slider/events/value-changed/" height="250"></demo>

> tip The event is an `EventCallback`. It can be synchronous and return `void`, or asynchronous and return `async Task`. Do not use `async void`.

> note The lambda expression in the handler is required by the framework: <https://github.com/aspnet/AspNetCore/issues/12226>.

For a complete example that measures the handle position and displays a value below it, see [Measure the Slider Handle Position](https://www.telerik.com/blazor-ui/documentation/knowledge-base/slider-measure-handle-position).

## OnChange

The `OnChange` event represents a user action - confirmation of the current value. It fires when the user:

* clicks on the increase/decrease buttons;
* clicks on the track;
* after the user stops dragging the handle;

If you use two-way binding, the [`ValueChanged`](https://www.telerik.com/blazor-ui/documentation/components/slider/events#valuechanged) event will fire continuously while the user is dragging the handle. This will result in continuous component re-rendering. If you want to avoid that, use one-way binding and update the value for the view-model in the `OnChange` event handler.

> tip The `OnChange` event is a custom event and does not interfere with bindings, so you can use it together with models and forms.

> caption Handle the OnChange event

<demo metaUrl="client/slider/events/on-change/" height="250"></demo>

> tip The event is an `EventCallback`. It can be synchronous and return `void`, or asynchronous and return `async Task`. Do not use `async void`.

## See Also

* [Slider Overview](https://www.telerik.com/blazor-ui/documentation/components/slider/overview)
