tween
ComponentsTemplatesShowcaseContact

Command Palette

Search for a command to run...

Getting Started
  • Introduction
  • Installation
  • StoryNew
Guides
  • Motion Principles
  • Scroll and Smooth Scroll
  • Performance and Accessibility
Scroll Animations
  • Sticky Cards Scroll
  • Rise Fan Cards Scroll
  • Rotate Stack Scroll
  • Doodle Lens ScrollNew
  • Slit Open Hero ScrollNew
  • Logo Mask Zoom ScrollNew
  • ASCII Dissolve ScrollNew
  • Lottie Flight ScrollNew
  • Inline Icon Text ScrollNew
  • Starfield ScrollNew
  • Name Swap ScrollNew
  • Spotlight Gallery HeroNew
  • Slit Rotate Hero ScrollNew
  • Stroke Cover ScrollNew
  • Stroke Rows ScrollNew
Text Animations
  • Text Skew Reveal
  • Block Text Reveal
Hover & Cursor
  • Image Trail Cursor
  • Cursor Depth Logo
  • Physics Tag Drop
  • Elastic Card ListNew
  • Magnetic Cards SpringNew
Sliders & Carousels
  • Wheel Fullscreen Carousel
  • Ripple Displacement Slider
  • Three.js Blend Slider
  • Stacked Deck Slider
  • Orbit Cylinder SliderNew
  • Fan Stack SliderNew
  • Exponential Strip SliderNew
  • Dual Column SliderNew
Galleries & Grids
  • Scroll Wave Gallery
Menus & Navigation
  • Shrink Page MenuNew
Preloaders & Intros
  • Floating Items RevealNew
  • Word Cycle RevealNew
  • Tile Grid LoaderNew
Page Transitions
  • Panel Assembly TransitionNew
3D & WebGL
  • Fractal Glass Hero
  • Fluid Cursor Canvas
  • Fluid Portrait Hero
  • Fluid Gradient Canvas
  • Inversion Lens HoverNew
UI Elements
  • Circular Widgets
  • Vinyl Cover
  • Image Explosion Footer
  • Accordion Image FramesNew

(Tween) — Motion registry

Animated components & full sites, one command away.

Product

  • Components
  • Templates
  • Installation
  • Guides
  • Blog
  • Contact

Categories

  • Scroll Animations
  • Text Animations
  • Hover & Cursor
  • Sliders & Carousels
  • Galleries & Grids
  • Menus & Navigation
  • Preloaders & Intros
  • Page Transitions
  • 3D & WebGL
  • UI Elements
TWEEN
ease: power2.inOut0.00s
© 2026 TweenBack to topBuilt by mohammad
  1. Docs/
  2. Components/
  3. Doodle Lens Scroll

Doodle Lens Scroll

PreviousNext

A pinned SVG doodle whose lenses turn into clip paths. Glare bands sweep across them, the camera zooms into the lens, an image fades in and the headline appears word by word.

Open in
doodle-lens-scroll-demo

Look Past The Glare

Every Coast Looks Better Through Solvei Glass

See You Out There

components/ui/doodle-lens-scroll-demo.tsx
import { DoodleLensScroll } from "@/registry/tween/doodle-lens-scroll"

export function DoodleLensScrollDemo() {
  return <DoodleLensScroll />
}

Installation

pnpm dlx shadcn@latest add https://tweenui.dev/r/doodle-lens-scroll.json

Usage

import { DoodleLensScroll } from "@/components/ui/doodle-lens-scroll"
<DoodleLensScroll
  lensImage="https://example.com/solvei-coast.jpg"
  headerTitle="Every Coast Looks Better Through Solvei Glass"
  finalZoomScale={22}
  zoomFocusPoint="47% 21%"
/>

How it works

The SVG is fetched, parsed with DOMParser (scripts and event attributes are stripped) and placed inline so its paths can be measured. Every path with opacity: 0.6 is treated as a lens glare; the shape just before it is the lens. For each lens the component:

  • clones the lens shape into a clipPath,
  • adds an <image> sized to the lens bounding box (hidden at first),
  • adds glaresPerLens white bands that sweep across the lens.

The spotlight section then pins for pinDistanceFactor viewport heights. One scrubbed ScrollTrigger drives everything:

  • glare bands sweep during the first 75% of the scroll,
  • the SVG scales from 1 toward finalZoomScale around zoomFocusPoint,
  • the lens images fade in over the second half,
  • header words switch on one by one between 65% and 85%.

The trigger uses the preview scroller when one is present and is rebuilt when the scroller resizes. With prefers-reduced-motion: reduce the final state is shown without scrubbing.

Props

PropTypeDefaultDescription
svgSrcstring"/doodle-lens-scroll/doodle.svg"SVG with lens glares marked by opacity: 0.6.
lensImagestringremote coastline photoImage revealed inside the lenses.
lensFillIdsstring[]doodle gradient idsInline-style substrings of lens shapes repainted with background.
introTitleReactNode"Look Past The Glare"Heading of the intro section.
headerTitlestring"Every Coast Looks Better Through Solvei Glass"Heading revealed word by word over the doodle.
outroTitleReactNode"See You Out There"Heading of the outro section.
glaresPerLensnumber2Number of glare bands per lens.
finalZoomScalenumber22Zoom factor; the scale reaches 1 + 2 * (finalZoomScale - 1) at the end.
zoomFocusPointstring"47% 21%"Transform origin of the zoom.
pinDistanceFactornumber3How many viewport heights the spotlight pins for.
backgroundstring"#ef6440"Spotlight background and lens fill color.
introBackgroundstring"#13222a"Intro and outro background.
foregroundstring"#ffffff"Text color.
fontFamilystringBarlow Condensed stackFont for all headings.
scrollerHTMLElement | string | null—Optional ScrollTrigger scroller; defaults to the preview scroller.
Rotate Stack ScrollSlit Open Hero Scroll

On This Page

InstallationUsageHow it worksProps

Contribute

  • Report an issue
  • Request a feature
  • Edit this page