Scroll Animation Trigger Demo 1
nyxui/scroll-animation-trigger-demo1FreeExample
Example showing a scroll animation trigger.
Live preview
live · rendered by the registry
Rendered by shadcn/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://nyxui.com/r/scroll-animation-trigger-demo1.jsonSource
1import React from "react";2import { ScrollAnimationTrigger } from "../ui/scroll-animation-trigger";3import { Palette } from "lucide-react";45export default function ScrollAnimationTriggerDemo1() {6 return (7 <div className="max-w-md mx-auto relative bg-background">8 <ScrollAnimationTrigger9 effect="color"10 className="p-3 sm:p-4 md:p-6"11 fromColor="#2b13c2"12 toColor="#f002cc"13 >14 <div15 className="bg-background p-6 sm:p-8 md:p-10 rounded-2xl sm:rounded-3xl shadow-xl w-full overflow-hidden relative group"16 style={{17 background:18 "linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(43, 19, 194, 0.1))",19 }}20 >21 <div className="absolute inset-0 opacity-10">22 <svg23 className="w-full h-full"24 viewBox="0 0 100 100"25 xmlns="http://www.w3.org/2000/svg"26 >27 <pattern28 id="grid"29 width="10"30 height="10"31 patternUnits="userSpaceOnUse"32 >33 <path34 d="M 10 0 L 0 0 0 10"35 fill="none"36 stroke="currentColor"37 strokeWidth="0.5"38 />39 </pattern>40 <rect width="100%" height="100%" fill="url(#grid)" />41 </svg>42 </div>4344 <div className="flex flex-col sm:flex-row gap-3 sm:gap-4 items-center mb-4 sm:mb-6">45 <div className="p-3 sm:p-4 bg-background/50 rounded-xl shadow-md border border-pink-100 dark:border-pink-900 relative z-10 group-hover:shadow-pink-200 dark:group-hover:shadow-pink-900 transition-shadow duration-300">46 <div className="absolute inset-0 bg-gradient-to-br from-pink-500 to-indigo-600 dark:from-pink-500 dark:to-indigo-600 rounded-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div>47 <Palette className="h-6 w-6 sm:h-7 sm:w-7 md:h-8 md:w-8 relative z-10" />48 </div>49 <h3 className="text-xl sm:text-2xl md:text-3xl font-bold text-center sm:text-start">50 Color Change51 </h3>52 </div>5354 <p className="text-center sm:text-start text-sm sm:text-base md:text-lg leading-relaxed relative z-10 mb-4 sm:mb-6">55 Watch the text transform through vibrant colors as you scroll56 through this section, creating a playful and engaging visual57// … truncated
What it pulls in
Other registry items
Files it writes
More from shadcn/ui
All 68 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| 3D Layered Card Demo3d-layered-card-demo | shadcn/ui | Examples | Free | no deps | |
| Animated Code Block Demoanimated-code-block-demo | shadcn/ui | Examples | Free | no deps | |
| Animated Grainy Background Demoanimated-grainy-bg-demo | shadcn/ui | Examples | Free | no deps | |
| Animated Text Demoanimated-text-demo | shadcn/ui | Examples | Free | no deps | |
| Apple Glass Effect Demoapple-glass-effect-demo | shadcn/ui | Examples | Free | no deps | |
| Bubble Background Demobubble-background-demo | shadcn/ui | Examples | Free | no deps | |
| Custom Cursor Democustom-cursor-demo | shadcn/ui | Examples | Free | no deps | |
| Cyberpunk Card Democyberpunk-card-demo | shadcn/ui | Examples | Free | no deps |
