# AutoScroll Threshold

The Chat component exposes an `AutoScrollThreshold` option that controls when incoming messages trigger automatic scrolling.

When users stay within the configured bottom zone, the Chat keeps new messages in view. When users scroll further away from the bottom, the Chat preserves their reading position and shows the scroll-to-bottom action instead.

## Configure AutoScrollThreshold

Set the threshold as a pixel value (for example, `120px`) or as a percentage of the viewport (for example, `50%`).

```Razor HtmlHelper
@(Html.Kendo().Chat()
    .Name("chat")
    .AuthorId("user")
    .AutoScrollThreshold("50%")
)
```

## Runtime Updates

You can update the threshold dynamically through the client-side API:

```JavaScript
const chat = $("#chat").data("kendoChat");
chat.setOptions({
    autoScrollThreshold: "200px"
});
```

## See Also

* [AutoScroll Threshold Demo (ASP.NET MVC)](https://demos.telerik.com/aspnet-mvc/chat/autoscroll-threshold)

* [Chat Overview](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/conversational-ui/chat/overview)

* [Chat Adornments](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/conversational-ui/chat/adornments)

* [Client-Side API of the Chat](https://docs.telerik.com/kendo-ui/api/ui/chat)
