Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Scroll Animation

Scroll To

ScrollTo.vue
Intro
Features
Pricing
FAQ

Install

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/scroll-to

Import the shared styles once in your application.

TSUsage
import ScrollTo from '@/components/beui/effects/ScrollTo.vue'
import '@/components/beui/styles.css'

API Reference

to
number | string | HTMLElement

Where to scroll: px offset, selector string or element.

Default—
offset?
number

Extra px offset from the target (e.g. to clear a sticky header).

Default0
duration?
number

Override the ease duration in seconds.

Default—
class?
string
Default—
container?
HTMLElement | null
Default—

Updated