> For the complete documentation index, see [llms.txt](https://yinglinhan.gitbook.io/framer-x-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yinglinhan.gitbook.io/framer-x-api/library-ku/scroll/content.md).

# Content

**dragEnabled:** boolean

设置是否可以滚动，默认是true

```jsx
<Scroll dragEnabled={false} />
```

wheelEnabled: boolean

设置是否可以滑轮滚动，默认是true

```jsx
<Scroll wheelEnabled={false} />
```

**direction:**"horizontal" | "vertical" | "both" | "locked"

设置可滚动的方向。默认是垂直滚动即"vertical"，如果设置"both"即水平和垂直方向都可滚动。

"locked" 是当你一开始滚动是往哪个方向，在未放开鼠标或者手指之前就只能一直在此方向滚动。

```jsx
// Horizontal
<Scroll direction="horizontal" />

// Vertical
<Scroll direction="vertical" />

// Locked
<Scroll direction="locked" />

// Both directions
<Scroll direction="both" />
```

**contentOffsetX:** MotionValue\<number> | number

组件初始状态下的Y轴滚动偏移量，默认是0。

```jsx
<Scroll contentOffsetX={20} />
```

**contentOffsetY:** MotionValue\<number> | number

组件初始状态下的X轴滚动偏移量，默认是0。

```jsx
<Scroll contentOffsetY={20} />
```

**scrollAnimate:** FrameProps\["animate"]

给滚动效果设置自定义的控制

```jsx
const controls = useAnimation()
controls.start({ y: -50 })
<Scroll scrollAnimate={controls} />
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://yinglinhan.gitbook.io/framer-x-api/library-ku/scroll/content.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
