产品设计
Using Scroll-Driven Animations for Opposing Scroll Directions
Sometimes designers have silly ideas that eventually grow on you. That happened to me with this concept where I had to build columns of items moving in opposite directions when a user scrolls the page. CodePen Embed Fallback Note: This … Using Scroll-Driven Animations for Opposing Scroll Directions originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.
AI 资讯
Create an INFINITE CSS Carousel🤖 w/ Negative animation-delay !
The main idea of a Carousel isn't just about moving a bunch of elements from left to right because there must be a smoothly infinite movement, this can be done by duplicating the element, but wouldn't it be a waste of time and resources to do so. So the best solution would be rather than moving the whole element, we just move each element on a time based manner, all elements will have the animation but each element will have a unique (incremented) index, by which we will delay its start, and if we made this delay negative, we will have a smooth movement without any lagging adding a will-change will make a separate compositing layer to make the animation run on gpu rather than cpu below is a demo by which, you can understand the effect You can reach me (if you had any problems with the effect): X / twitter "where I post a lot!" LinkedIn
开发者
A First Look at Scroll-Triggered Animations
Let's poke at the differences between scroll- driven and scroll- triggered animations. A First Look at Scroll-Triggered Animations originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.
工具
Creating Memorable Web Experiences: A Modern CSS Toolkit
There are many ways to create memorable experiences. Sometimes it's as simple as a form that completes smoothly. But here I'm interested in sharing techniques I reach for when I want a site to feel alive and be remembered. Creating Memorable Web Experiences: A Modern CSS Toolkit originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.
AI 资讯
Scroll-Driven, Scroll-Triggered, Scroll States, and View Transitions
I've said one and mean another, and I've used one when I needed another. Please bear with me as I note the similarities and differences between scroll-driven animations, scroll-triggered animations, container query scroll states, and view transitions for my future self. Scroll-Driven, Scroll-Triggered, Scroll States, and View Transitions originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.
AI 资讯
I Replaced Rive, GSAP, and Lottie with One Visual Runtime. Here's What Happened to Our React App.
Six months ago, our React app's animation stack looked like a dependency graveyard: Rive for interactive vector graphics GSAP for timeline-based UI animations Lottie for JSON animations imported from design Framer Motion for React-specific transitions Plus a few hand-rolled CSS animations for good measure Four tools. Four mental models. Four runtime dependencies. And a growing gap between what designers shipped and what developers could maintain. We consolidated everything into a single visual runtime. Here's what actually happened. The Problem Nobody Talks About Animation tools are great in isolation. The cracks appear when you need a single component to do multiple things: A button that plays a Rive animation on hover, transitions with Framer Motion on click, and shows a Lottie loading state A card that animates into view with GSAP , has hover states in Rive , and a pressed state in CSS A form that validates with Framer Motion shake animations, loads with Lottie spinners, and succeeds with a Rive celebration Each tool handles its piece. None of them talk to each other. You end up writing coordination code that's more complex than the animations themselves. What We Switched To We moved to ExodeUI — a visual runtime that combines state machines with vector rendering. Instead of four tools plus coordination code, we have: One editor where designers define visual states as nodes One file format that stores both appearance and behavior One export that generates production React components One runtime that renders everything natively The pitch sounds almost too clean. We were skeptical too. What We Actually Gained 1. Eliminated three runtime dependencies Removing Rive's .riv player, Lottie's JSON player, and GSAP's timeline engine from our bundle saved roughly 180KB gzipped. Not life-changing for desktop, but noticeable on mobile. 2. Design files became production code The biggest win wasn't technical — it was process. Our designer builds components in ExodeUI with stat
开发者
offset-path
The offset-path property in CSS defines a movement path for an element to follow during animation. This property began life as motion-path . This, and all other related motion-* properties, are being renamed offset-* in the spec . We’re changing … offset-path originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.
AI 资讯
State-Driven Animations in Vue: Create Smooth UI Transitions with Reactive State
Animations can make an application feel faster, smoother, and more polished. However, many developers think animations are only useful for things like: page transitions modals enter/leave effects But Vue provides another powerful pattern - State-driven animations. Instead of animating when elements are added or removed from the DOM, you animate changes in reactive state. This allows you to create rich interactive experiences while keeping your code declarative and easy to maintain. In this article, we'll explore: What state-driven animations are How they differ from regular Vue transitions What problems they solve How to implement them in Vue Best practices for creating smooth UI interactions Let's dive in. 🤔 What Are State-Driven Animations? Most Vue developers are familiar with the <Transition> component. Example: <Transition> <Modal v-if= "isOpen" /> </Transition> This animates an element when it enters or leaves the DOM. But what if the element already exists and only its state changes? For example: a progress bar grows a card expands a chart updates a panel changes size a value changes position This is where state-driven animations shine. Instead of animating DOM insertion or removal, you animate changes caused by reactive state. 🟢 What Problem Do State-Driven Animations Solve? Without animations, state changes can feel abrupt. Example: <div :style= "{ width: progress + '%' }" ></div> When progress changes: progress . value = 80 The width instantly jumps. This works technically... but it doesn't feel great. 🟢 A Simple Example Let's create an animated progress bar. < script setup lang= "ts" > const progress = ref ( 20 ) function increase () { progress . value += 20 } </ script > < template > <button @ click= "increase" > Increase Progress </button> <div class= "progress-container" > <div class= "progress-bar" :style= " { width: `${progress}%` }" /> </div> </ template > CSS: .progress-container { width : 100% ; height : 12px ; background : #eee ; } .progress-bar
AI 资讯
Lottie JSON vs .lottie Format — What's the Difference and Which Should You Use?
Two file formats. Same animations. Very different performance characteristics. If you've used Lottie before, you know the .json file — you export it from After Effects with the Bodymovin plugin, drop it into lottie-web, done. But there's a newer format: .lottie. It's a binary container that replaces the JSON, and if you're starting a new project, it's worth understanding the difference. What is Lottie JSON? The original format. A .json file that describes vector animations: shapes, keyframes, layers, colors, timing. It's plain text, human-readable, and widely supported. Pros: Works everywhere Lottie is supported Human-readable (you can inspect and edit it) Supported by every tool and library Cons: Large files (uncompressed JSON with lots of repeated data) No built-in support for multiple animations in one file No metadata or preview image support What is .lottie? The .lottie format (sometimes called dotLottie) is a ZIP container with a .lottie extension. Inside it contains: The animation data (compressed JSON) A manifest.json describing the file Optional preview images Optional multiple animations in one container It was developed by LottieFiles and adopted as the preferred format for modern Lottie tooling. Pros: ~30-70% smaller than equivalent JSON (thanks to compression) Can contain multiple animations in one file Supports preview thumbnails Cleaner API in the @lottiefiles/dotlottie-web renderer Cons: Binary format — not human-readable Requires the dotLottie player (not the older lottie-web) Slightly less universal support File Size Comparison For a typical 2-second UI animation: Format Typical Size Lottie JSON (.json) 40 – 120 KB dotLottie (.lottie) 15 – 50 KB The size reduction comes from standard ZIP compression applied to the JSON content. It's meaningful on mobile connections. Converting Between Formats The easiest way to convert between .json and .lottie formats is using the free browser-based tools at IconKing . No signup required, no file size limits. Just
AI 资讯
Free Loading Animations for Web Apps — Lottie, GIF, and SVG Spinners (2025)
Loading states are one of the most overlooked parts of app UX. A bad spinner makes an app feel cheap. A good loading animation makes wait time feel intentional. Here's a curated list of free loading animations you can use right now, organized by format. Lottie Loading Animations (Best Quality) Lottie is the gold standard for loading animations in 2025. Files are small (5-30KB), resolution-independent, and perfectly smooth at any size. IconKing Free Lottie Loaders — 500+ free Lottie animations including dozens of loading spinners, progress indicators, and transition animations. Download as JSON, no account required. Preview any file before downloading at iconking.net/preview . Customize colors to match your brand at iconking.net/editor — swap any color in-browser. Implementation (React): import { useEffect , useRef } from ' react ' ; import lottie from ' lottie-web ' ; function Loader ({ size = 80 }) { const ref = useRef ( null ); useEffect (() => { const anim = lottie . loadAnimation ({ container : ref . current , renderer : ' svg ' , loop : true , autoplay : true , path : ' /animations/loader.json ' }); return () => anim . destroy (); }, []); return < div ref = { ref } style = { { width : size , height : size } } />; } Implementation (Vanilla JS): import lottie from ' lottie-web ' ; lottie . loadAnimation ({ container : document . getElementById ( ' loader ' ), renderer : ' svg ' , loop : true , autoplay : true , path : ' /animations/loader.json ' }); Convert Lottie Loaders to GIF Need the loading animation as a GIF for emails, Notion docs, or environments where you can't run JavaScript? Free Lottie to GIF Converter — upload your JSON, get a GIF. Browser-based, no signup. Other export formats available at iconking.net: Lottie to WebP — animated WebP, smaller than GIF Lottie to APNG — animated PNG with transparency Lottie to MP4 — for video embeds Lottie to WebM — transparent video Lottie to SVG — static frame as SVG CSS SVG Spinners (Zero Dependencies) For simple l
AI 资讯
How to Add Lottie Animations to Your Website (Free JSON Files Included)
Lottie animations are small, crisp, and interactive. This guide covers finding free animations through production-ready implementation. What Is Lottie? Lottie is a JSON-based animation format from Airbnb. After Effects animations are exported via Bodymovin as small JSON files (10-100KB), rendered by a lightweight JS library. Key advantages over GIF: 10-50x smaller file size Resolution independent vector quality on any screen Interactive — play, pause, seek, speed control Full alpha transparency — no halo effects Step 1: Get Free Lottie JSON Files IconKing Free Lottie Library — 500+ free animations: UI icons, loaders, flags, illustrations. No account needed. Preview any file first: iconking.net/preview — drag and drop to instantly see how it plays. Edit colors and speed: iconking.net/editor — swap colors, adjust timing, all in-browser. Step 2: Install lottie-web npm install lottie-web Or CDN: <script src= "https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js" ></script> Step 3: Basic Implementation import lottie from ' lottie-web ' ; const animation = lottie . loadAnimation ({ container : document . getElementById ( ' lottie-container ' ), renderer : ' svg ' , loop : true , autoplay : true , path : ' /animations/my-animation.json ' }); Step 4: React Component import { useEffect , useRef } from ' react ' ; import lottie from ' lottie-web ' ; function LottieAnimation ({ src , loop = true , size = 200 }) { const ref = useRef ( null ); useEffect (() => { const anim = lottie . loadAnimation ({ container : ref . current , renderer : ' svg ' , loop , autoplay : true , path : src }); return () => anim . destroy (); }, [ src ]); return < div ref = { ref } style = { { width : size , height : size } } />; } Step 5: Playback Controls animation . play (); animation . pause (); animation . setSpeed ( 1.5 ); animation . goToAndStop ( 30 , true ); // frame 30 animation . playSegments ([ 0 , 60 ], true ); // frames 0-60 only animation . addEventListener ( ' complete
开发者
Revealing Text With CSS letter-spacing
Until we get something like ::nth-letter , there are still some really cool text effects we can make from existing CSS features, like letter-spacing , ::first-word and ::first-line . Revealing Text With CSS letter-spacing originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.
AI 资讯
A Scrollytelling Gift for Mum on Mother’s Day 2026
I will explain how my mum inspired this 2026 Mother’s Day scrollytelling experiment — but also, how she inspired my approach to dev and life. A Scrollytelling Gift for Mum on Mother’s Day 2026 originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.