context
base ui scroll area writes four custom properties on the viewport element on every scroll event.
--scroll-area-overflow-x-start
--scroll-area-overflow-x-end
--scroll-area-overflow-y-start
--scroll-area-overflow-y-end
context
base ui scroll area writes four custom properties on the viewport element on every scroll event.
--scroll-area-overflow-x-start
--scroll-area-overflow-x-end
--scroll-area-overflow-y-start
--scroll-area-overflow-y-end
| { | |
| "css.customData": [".vscode/tailwind.json"] | |
| } |
| "use client" | |
| import { cn } from "@/lib/utils" | |
| import { useRef, useState } from "react" | |
| const MOCK_STEPS = { | |
| 0: "Step 1", | |
| 1: "Step 2", | |
| 2: "Step 3", | |
| 3: "Step 4", |
| // useful links: | |
| // custom easing by Lochie (x.com/lochieaxon): https://www.easing.dev | |
| // motion-primitives by Ibelick (x.com/Ibelick): https://motion-primitives.com/docs | |
| // The Magic of Clip Path article by Emil Kowalski (x.com/emilkowalski_): https://emilkowal.ski/ui/the-magic-of-clip-path | |
| // we use same transition for every element to make it look consistent | |
| const transition: Transition = { | |
| duration: 2.5, | |
| // custom easing from https://www.easing.dev | |
| ease: [0.175, 0.885, 0.32, 1], |
| <svg width="300" height="300" viewBox="0 0 300 300"> | |
| <defs> | |
| <filter id="paperEffect"> | |
| <feTurbulence | |
| type="fractalNoise" | |
| baseFrequency="0.04" | |
| numOctaves="5" | |
| result="noise" | |
| /> | |
| <feDiffuseLighting |
| "use client"; | |
| import { motion, Variants } from "framer-motion"; | |
| const pathVariants: Variants = { | |
| initial: { pathLength: 0, fillOpacity: 0 }, | |
| animate: ({ | |
| fillOpacity, | |
| delay, | |
| }: { |