---
id: fast-foundation.horizontalscroll.scrolltoposition
title: HorizontalScroll.scrollToPosition() method
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-foundation](./fast-foundation.md) &gt; [HorizontalScroll](./fast-foundation.horizontalscroll.md) &gt; [scrollToPosition](./fast-foundation.horizontalscroll.scrolltoposition.md)

## HorizontalScroll.scrollToPosition() method

Handles scrolling with easing

<b>Signature:</b>

```typescript
scrollToPosition(newPosition: number, position?: number): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  newPosition | number | position to scroll to |
|  position | number | starting position |

<b>Returns:</b>

void
