scroll-animation-radius Demo

PreviousNext

Demo showing how to use scroll animations.

Docs
systaliko-uiblock

Preview

Loading preview…
registry/demo/scroll-animations/scroll-animation-radius/index.tsx
import {
  ScrollAnimation,
  ScrollInset,
  ScrollTranslateY,
} from '@/components/systaliko-ui/scroll-animations/scroll-animation';

export function ScrollRadiusDemo() {
  return (
    <ScrollAnimation>
      <ScrollTranslateY className="h-dvh  py-8 px-6 flex justify-center items-center">
        <ScrollInset
          className="overflow-hidden size-96"
          insetRangeY={[0, 0]}
          insetXRange={[0, 0]}
          roundednessRange={[1000, 16]}
        >
          <img
            src="https://images.unsplash.com/photo-1608501078713-8e445a709b39?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
            alt="tokyo"
            className="size-full object-cover"
          />
        </ScrollInset>
      </ScrollTranslateY>
    </ScrollAnimation>
  );
}

Installation

npx shadcn@latest add @systaliko-ui/scroll-animation-radius-demo

Usage

import { ScrollAnimationRadiusDemo } from "@/components/scroll-animation-radius-demo"
<ScrollAnimationRadiusDemo />