mirukullacode

Tweenly Scroll Focus

Component

About

A column of images where the one in the center grows, with a title list that stays in sync.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Tweenly Scroll Focus to your project and fits it to your theme.

Code

How Tweenly Scroll Focus is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";
import {ThemeProvider as LibraryDemoThemeProvider} from "next-themes";
import { ScrollFocus } from "@/components/ui/tweenly-scroll-focus"

const items = [
  {
    "src": "https://trytweenly.vercel.app/gallery/01.jpg",
    "alt": "Gallery image 1",
    "title": "Everything"
  },
  {
    "src": "https://trytweenly.vercel.app/gallery/02.jpg",
    "alt": "Gallery image 2",
    "title": "Horizon"
  },
  {
    "src": "https://trytweenly.vercel.app/gallery/03.jpg",
    "alt": "Gallery image 3",
    "title": "Synchrodogs"
  },
  {
    "src": "https://trytweenly.vercel.app/gallery/04.jpg",
    "alt": "Gallery image 4",
    "title": "Dune"
  },
  {
    "src": "https://trytweenly.vercel.app/gallery/05.jpg",
    "alt": "Gallery image 5",
    "title": "Meadow"
  },
  {
    "src": "https://trytweenly.vercel.app/gallery/06.jpg",
    "alt": "Gallery image 6",
    "title": "Cultivator"
  },
  {
    "src": "https://trytweenly.vercel.app/gallery/07.jpg",
    "alt": "Gallery image 7",
    "title": "Tide"
  },
  {
    "src": "https://trytweenly.vercel.app/gallery/08.jpg",
    "alt": "Gallery image 8",
    "title": "Ember"
  }
];

export function Demo() {
  return (
    <ScrollFocus items={items} />
  )
}

function SourceSpecimen(){return <Demo/>}
export default function LibraryRegistryPreview(){return <LibraryDemoThemeProvider defaultTheme="dark" enableSystem={false}><div data-component-demo data-demo-theme="dark" data-theme="dark" className="dark" style={{background:"var(--background)",color:"var(--foreground)"}}><div className="relative w-full min-w-0 max-w-5xl min-h-[400px] flex items-center justify-center"><SourceSpecimen/></div></div></LibraryDemoThemeProvider>}

Dependencies

More by mirukullacode

View all
  • Chart Line

    Chart Line

    33
  • Tweenly AI Recorder

    Tweenly AI Recorder

    29
  • Animated Bar Chart

    Animated Bar Chart

    28
  • Tweenly Chart KPI

    Tweenly Chart KPI

    18
  • Tweenly Chart Radial

    Tweenly Chart Radial

    16
  • Tweenly Image Arc

    Tweenly Image Arc

    15
  • Tweenly Hero Background

    Tweenly Hero Background

    12
  • Tweenly Curved Carousel

    Tweenly Curved Carousel

    12