Scroll Animation

Scroll-driven motion: a Lenis smooth-scroll provider and a reading-progress indicator that reads from it.

Smooth Scroll

smooth-scroll.tsx

Smooth-scroll provider over Lenis with a useSmoothScroll hook exposing scroll offset, progress and velocity. Reduced-motion safe.

Section 1
Section 2
Section 3
Section 4
Section 5
Section 6
Section 7
Section 8
Section 9
Section 10
Section 11
Section 12
Section 13
Section 14
Section 15
Section 16

Install

$ bunx --bun shadcn add @beui/smooth-scroll

API Reference

root?
boolean

Drive the page (window) when true, or a contained scroll area when false.

true
lerp?
number

Smoothing factor; lower is smoother and heavier.

0.1
duration?
number

Wheel / programmatic ease duration in seconds.

1.2
orientation?
"vertical" | "horizontal"
vertical
wheelMultiplier?
number

Wheel scroll speed multiplier.

1
touch?
boolean

Smooth touch scrolling. Off by default — native momentum is good on mobile.

false
className?
string

Scroll Progress

scroll-progress.tsx

Reading-progress indicator — fixed bar or circular ring — driven by scroll position via useSmoothScroll, with spring smoothing.

Section 1
Section 2
Section 3
Section 4
Section 5
Section 6
Section 7
Section 8
Section 9
Section 10
Section 11
Section 12
Section 13
Section 14
Section 15
Section 16
Section 17
Section 18

Install

$ bunx --bun shadcn add @beui/scroll-progress

API Reference

variant?
"bar" | "circle"
position?
"top" | "bottom"
height?
number

Bar thickness in px.

fixed?
boolean

Position the bar with `fixed` (page) or `absolute` (embedded).

progress?
any

Override the scroll source. Defaults to the page via useSmoothScroll.

spring?
boolean

Spring-smooth the value. Disabled automatically under reduced motion.

className?
string
size?
number

Diameter in px.

thickness?
number

Stroke width in px.

Parallax

parallax.tsx

Wrapper that drifts its children at a speed factor as they cross the viewport, on either axis. Reduced-motion safe.

Scroll down ↓
Parallax
↑ Scroll up

Install

$ bunx --bun shadcn add @beui/parallax

API Reference

speed?
number

Drift as a fraction of the element's travel through the viewport. Positive moves with the scroll (foreground), negative against it (background). ~0.1–0.5 reads best.

0.3
axis?
"x" | "y"
y
container?
any

Scroll container for contained scroll areas. Defaults to the viewport.

spring?
boolean

Spring-smooth the drift. Disabled automatically under reduced motion.

true
className?
string

Scroll To

scroll-to.tsx

Button that smooth-scrolls to a target (offset, selector or element) via the active SmoothScroll provider; reduced-motion jumps instantly.

Intro
Features
Pricing
FAQ

Install

$ bunx --bun shadcn add @beui/scroll-to

API Reference

to
any

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

offset?
number

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

duration?
number

Override the ease duration in seconds.

className?
string

Scroll Reveal

scroll-reveal.tsx

Reveals its children with a spring slide and blur as they enter the viewport, once or every time. Reduced-motion keeps a fade.

Scroll ↓
Spring slide
Blur in
Staggered by delay
Reveal once
End

Install

$ bunx --bun shadcn add @beui/scroll-reveal

API Reference

y?
number

Slide distance in px before reveal.

16
blur?
number

Enter blur in px (kept ≤ 10 per motion conventions).

8
duration?
number

Reveal duration in seconds.

0.6
delay?
number
0
once?
boolean

Reveal only once (default) or every time it enters view.

true
amount?
number | "some" | "all"

Portion of the element that must be visible to trigger.

0.3
root?
any

Scroll root for contained scroll areas. Defaults to the viewport.

className?
string

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.

Updated