
Ui Animation
Add hardware-accelerated CSS motion—clip-path reveals, tab color wipes, and scroll-driven image effects—without leaning only on opacity and transform.
Overview
ui-animation is an agent skill for the Build phase that teaches CSS clip-path patterns for hardware-accelerated UI motion.
Install
npx skills add https://github.com/mblode/agent-skills --skill ui-animationWhat is this skill?
- Documents clip-path inset() for right-to-left reveals with eased transitions
- Tab active-state pattern via duplicated tab list and animated clip variables
- Hold-to-delete and on-scroll image reveal recipes
- Comparison slider implementation using clip-path
- Five documented pattern sections in the skill reference
- 5 documented pattern sections including inset shape, tabs, hold-to-delete, scroll reveals, and comparison sliders
Adoption & trust: 5.3k installs on skills.sh; 44 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need polished transitions—tab colors, reveals, sliders—that opacity and transform alone cannot express cleanly.
Who is it for?
Solo builders polishing SaaS or marketing UIs who want clip-path recipes for tabs, reveals, and comparison sliders.
Skip if: Teams needing a full motion-design system, native mobile animations, or backend-only work with no CSS surface.
When should I use this skill?
Implementing frontend UI that needs clip-path-based reveals, tab color transitions, or comparison sliders.
What do I get? / Deliverables
You get concrete clip-path CSS and JS variable patterns ready to drop into components during frontend implementation.
- Clip-path CSS snippets
- Tab overlay variable wiring pattern
- Component-level animation states
Recommended Skills
Journey fit
Polish and interaction design land in the build phase when solo builders are implementing UI, not during idea or launch distribution work. The skill is pure CSS and DOM patterns for components and pages, so the canonical shelf is build → frontend.
How it compares
Use as a focused CSS pattern reference instead of pulling a heavy animation framework for a few wipe effects.
Common Questions / FAQ
Who is ui-animation for?
Indie and solo frontend builders using AI coding agents to ship web UIs who want clip-path animation recipes without researching each pattern from scratch.
When should I use ui-animation?
During the build phase while implementing tabs, image galleries, hold-to-delete controls, or before/after sliders—when you want GPU-friendly motion beyond basic fade and scale.
Is ui-animation safe to install?
It is documentation-style CSS guidance with no implied shell or network access from the skill itself; review the Security Audits panel on this page before trusting any third-party skill package.
SKILL.md
READMESKILL.md - Ui Animation
# clip-path for Animation `clip-path` is one of the most powerful animation tools in CSS. It is hardware-accelerated and creates effects impossible with `opacity` and `transform` alone. ## Contents - [The inset shape](#the-inset-shape) - [Tab colour transitions](#tab-colour-transitions) - [Hold-to-delete](#hold-to-delete) - [Image reveals on scroll](#image-reveals-on-scroll) - [Comparison sliders](#comparison-sliders) ## The inset shape `clip-path: inset(top right bottom left)` defines a rectangular clipping region. Each value "eats" into the element from that side. ```css /* Fully hidden from right */ .hidden { clip-path: inset(0 100% 0 0); } /* Fully visible */ .visible { clip-path: inset(0 0 0 0); } ``` Animate between states with a CSS transition: ```css .reveal { clip-path: inset(0 100% 0 0); transition: clip-path 300ms cubic-bezier(0.22, 1, 0.36, 1); } .reveal.active { clip-path: inset(0 0 0 0); } ``` ## Tab colour transitions Duplicate the tab list. Style the copy as "active" (different background, different text colour). Clip the copy so only the active tab is visible. Animate the clip on tab change. This creates a seamless colour transition that timing individual `color` transitions can never achieve. ```css .tabs-active-overlay { clip-path: inset(0 var(--clip-right) 0 var(--clip-left)); transition: clip-path 200ms cubic-bezier(0.22, 1, 0.36, 1); } ``` Update `--clip-left` and `--clip-right` via JavaScript when the active tab changes. ## Hold-to-delete Use `clip-path: inset(0 100% 0 0)` on a coloured overlay. On `:active`, transition to `inset(0 0 0 0)` over 2s with `linear` timing. On release, snap back with 200ms `ease-out`. Pair with `scale(0.97)` on the button for press feedback. ```css .delete-overlay { clip-path: inset(0 100% 0 0); transition: clip-path 200ms ease-out; } .delete-button:active .delete-overlay { clip-path: inset(0 0 0 0); transition: clip-path 2s linear; } ``` ## Image reveals on scroll Start with `clip-path: inset(0 0 100% 0)` (hidden from bottom). Animate to `inset(0 0 0 0)` when the element enters the viewport. ```tsx "use client"; import { useRef, useEffect, useState } from "react"; export function RevealImage({ src, alt }: { src: string; alt: string }) { const ref = useRef<HTMLDivElement>(null); const [visible, setVisible] = useState(false); useEffect(() => { const el = ref.current; if (!el) return; const io = new IntersectionObserver( ([entry]) => { if (entry.isIntersecting) setVisible(true); }, { threshold: 0.1, rootMargin: "-100px" } ); io.observe(el); return () => io.disconnect(); }, []); return ( <div ref={ref} style={{ clipPath: visible ? "inset(0 0 0 0)" : "inset(0 0 100% 0)", transition: "clip-path 800ms cubic-bezier(0.77, 0, 0.175, 1)", }} > <img src={src} alt={alt} /> </div> ); } ``` ## Comparison sliders Overlay two images. Clip the top image with `clip-path: inset(0 50% 0 0)`. Adjust the right inset based on drag position. No extra DOM elements needed, fully hardware-accelerated. ```css .comparison-top { clip-path: inset(0 var(--split) 0 0); } ``` Update `--split` via pointer events on the slider handle. # Component Animation Patterns ## Contents - [Buttons](#buttons) - [Popovers and dropdowns](#popovers-and-dropdowns) - [Tooltips](#tooltips) - [Drawers and panels](#drawers-and-panels) - [Modals and dialogs](#modals-and-dialogs) - [Toasts](#toasts) - [Lists and stagger](#lists-and-stagger) - [Hover effects](#hover-effects) ## Buttons Add `transform: scale(0.97)` on `:active` for instant press feedback. ```css .button { transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1); } .button:active { transform: scale(0.97); } ``` `scale(0.9)` is too aggressive — the button visibly collapses and draws the eye to the shrinking rather than the action. Press feedback should be felt, not seen. Stay in the `0.96–0.98` range. Use blur