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?
"horizontal" | "vertical"
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?
"circle" | "bar"
position?
"bottom" | "top"
height?
number

Bar thickness in px.

fixed?
boolean

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

progress?
MotionValue<number>

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?
RefObject<HTMLElement | null>

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
ScrollTarget

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 | "all" | "some"

Portion of the element that must be visible to trigger.

0.3
root?
RefObject<Element | null>

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

className?
string

Updated