# ScrollPageIntoViewOptions

## Content

# Type Alias: ScrollPageIntoViewOptions

```ts
type ScrollPageIntoViewOptions = ScrollIntoViewOptions & object;
```

Options for scrolling the page into view, extending the DOM scroll options type.

## Type declaration

### behavior?

```ts
optional behavior: ScrollBehavior;
```

Determines whether scrolling is instant or animates smoothly.
This option is a string which must take one of the following values:
  - 'smooth': scrolling should animate smoothly
  - 'instant': scrolling should happen instantly in a single jump
  - 'auto': scroll behavior is determined by the computed value of scroll-behavior

### block?

```ts
optional block: ScrollLogicalPosition;
```

Defines vertical alignment. One of start, center, end, or nearest. Defaults to start.

### inline?

```ts
optional inline: ScrollLogicalPosition;
```

Defines horizontal alignment. One of start, center, end, or nearest. Defaults to nearest.

### scrollMode?

```ts
optional scrollMode: "always" | "if-needed";
```

Scroll mode property. Set to 'if-needed' if you don't want to scroll when the page is partially visible.
Defaults to 'if-needed'.

### visibilityThreshold?

```ts
optional visibilityThreshold: number;
```

Sets the percentage of page visibility that triggers scrolling into view when the scrollMode property is set to 'if-needed'.
