agentleFS
BigTsungBigTsung/SwiftUI-Motion-Library/skills/swiftui-motion/SKILL.md

swiftui-motion

Skill2 starsChanged 8 days agoMITView on GitHub

Adds polished SwiftUI animations from SwiftUI Motion Library: animated text, button micro-interactions, card transitions, loaders, confetti, animated backgrounds, particles and 3D effects. Use when building or improving SwiftUI UI that needs animation, transitions, loading or success states, celebratory feedback, or a moving background.

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If no effect fits, adapt the closest one: its "How it works" note describes the technique.

    line 30

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SwiftUI Motion Library

145 ready-made SwiftUI motion effects as one-line views and modifiers, with no dependencies. Source: https://github.com/BigTsung/SwiftUI-Motion-Library

Install

// Package.swift
.package(url: "https://github.com/BigTsung/SwiftUI-Motion-Library", from: "0.6.0")
// target dependencies
.product(name: "MotionLibrary", package: "SwiftUI-Motion-Library")

Then import MotionLibrary. Requires iOS 17, macOS 14 or visionOS 1; effects marked iOS 18+ are @available(iOS 18, macOS 15, visionOS 2, *).

In an Xcode app project, add the package with File → Add Package Dependencies… rather than editing project.pbxproj by hand. To use one effect without the package, copy its source file plus any files listed under "Files" for it (shared helpers such as Support/Haptics.swift); every effect compiles from just those files.

How to use

  1. Pick the effect from the table that matches what the UI needs. Prefer the library API over hand-writing the animation.
  2. Add the package if the project doesn't have it yet (in an Xcode app project, ask the user to use File → Add Package Dependencies… instead of editing project.pbxproj), and import MotionLibrary. If the user wants no dependency, copy the effect's files instead: its own source plus the helpers listed for it in Docs/motion-catalog.json (files) or llms-full.txt ("Files").
  3. Copy the usage for that effect from references/effects.md (or https://raw.githubusercontent.com/BigTsung/SwiftUI-Motion-Library/main/llms-full.txt) and adapt colours, sizes and timing through the parameters.
  4. Effects marked iOS 18+ need if #available(iOS 18, macOS 15, visionOS 2, *) when the app targets an older OS.
  5. Effects with large or looping motion already honour Reduce Motion (they pause, fade or drop the movement), so don't wrap them in your own check.
  6. If no effect fits, adapt the closest one: its "How it works" note describes the technique.

Effects

Text

EffectAPITriggerUse it for
TypewriterTypewriterText("…")Appear / Value changeCharacters appear one by one with a blinking cursor.
Scramble / DecodeScrambleText("…")Appear / Value changeRandom glyphs resolve into the real text from left to right.
Shimmer.shimmer()LoopA band of light sweeps across text or skeleton placeholders.
Gradient Sweep.gradientSweep()LoopA multi-colour gradient flows through the letters forever.
Blur-in WordsBlurInText("…")Appear / Value changeWords come into focus one after another: fade, rise and un-blur.
MarqueeMarqueeText("…")LoopText too long for its line scrolls sideways forever, with faded edges.
Wave Text (iOS 18+)WaveText("…")LoopLetters bob in a travelling wave, drawn with a TextRenderer.
Count UpCountUpText(value: …)Appear / Value changeA number counts up from zero, and from old to new value on change.
Split Text (iOS 18+)SplitText("…")Appear / Value changeLetters rise into place one after another with a small overshoot.
Rotating TextRotatingText([…])LoopWords take turns: the current one slides up and out as the next rises in.
Glitch.glitch()LoopEvery few seconds the view tears: an RGB split, sliced rows and jitter.
Circular TextCircularText("…")LoopText wrapped around a circle that slowly turns, like a rotating badge.
Focus TextFocusText("…")LoopFocus hops from word to word: sharp and bracketed, the rest blurred.
Highlighter.highlighter()Appear / Value changeA marker pen swipes across the text, or underlines it, left to right.
Morphing TextMorphingText([…])LoopWords melt into each other with a gooey, liquid morph.
Neon Flicker.neon(color:flicker:)LoopA glowing neon tube that stutters on and glitches now and then.
Karaoke TextKaraokeText(_:progress:)Value change / ScrollA line fills with colour left to right as progress goes from 0 to 1.
Weight WaveWeightWaveText(_:)LoopLetters swell from thin to black and back in a travelling wave.
Exploding Text (iOS 18+)ExplodingText(_:isExploded:)Value change / TapLetters blast apart spinning and spring back into place.
Liquid Fill TextLiquidFillText(_:progress:)Value change / LoopA wavy water line rises inside the letters as progress grows.

Button

EffectAPITriggerUse it for
Pressable.buttonStyle(.pressable)PressButton squashes and darkens on press, then springs back with a light haptic.
Tap Ripple.ripple()TapA circular ripple expands from the exact tap location.
Error Shake.shake(trigger:)Value changeHorizontal "no" shake for wrong input, triggered by a value change.
Magnetic Button.magnetic()Hover / DragThe button drifts toward a nearby pointer or dragging finger, then springs home.
Hold to ConfirmHoldToConfirmButton("…") { }PressLiquid fills the button while you hold; the action runs only when it's full.
Loading → SuccessStatusButton("…", status:) { }Tap / Value changeThe button morphs into a spinner, then a green checkmark or a red shake.
Glow Border.glowBorder()LoopA rainbow border runs around the view with a soft glow behind it.
Shine.shine(every:) / .shine(trigger:)Value change / LoopA slanted glint of light sweeps across the button, on cue or on a beat.
Jelly.jelly(trigger:)Tap / Value changeA rubbery squash-and-stretch wobble on every tap.
Click Spark.clickSpark()TapShort spark lines shoot out from the exact point you tapped.
Like ButtonLikeButton(isLiked:)TapThe heart pops in as a ring bursts open and coloured dots fly out.
Animated SymbolAnimatedSymbol("…", style:)LoopSF Symbols that keep moving: bounce on a beat, pulse, variable colour.
Liquid Toggle.toggleStyle(.liquid)TapA switch whose knob stretches like a drop of liquid as it slides.
Gooey MenuGooeyMenu(symbols:action:)TapA round button splits into a fan of buttons like a drop of liquid.
Slide to ConfirmSlideToConfirm(_:action:)DragDrag the knob all the way across to run the action; let go early and it springs back.
Download ButtonDownloadButton(progress:) { }Tap / Value changeA capsule shrinks into a progress ring, then pops into a checkmark.
Star RatingStarRating(rating:)Tap / Value changeStars fill one after another with a springy pop and a burst of sparks.
Bouncy Tab BarBouncyTabBar(selection:items:)Tap / Value changeA pill glides to the selected tab and its icon squashes and hops.
Pull CordPullCord(isOn:)Drag / TapA lamp cord toggle: pull the knob down, it clicks and springs back swinging.

Card & Group

EffectAPITriggerUse it for
Staggered Entrance.staggeredAppear(index:)AppearList items fade and rise into place one after another.
3D Tilt.tiltOnDrag()DragCard tilts in 3D toward the finger with a moving glare, then springs flat.
Scroll Reveal.scrollReveal()ScrollRows scale up and come into focus as they enter the visible area.
Flip CardFlipCard(isFlipped:) { } back: { }Tap / Value changeA two-sided card turns over in 3D with a spring.
Swipe Card StackSwipeCardStack(items) { item in }DragTinder-style deck: drag the top card away and the pile moves up.
Parallax CarouselParallaxCarousel(items) { item in }ScrollPaging cards whose images slide slower than the cards, for depth.
Expandable CardExpandableCard(isExpanded:) { } detail: { }TapTap the header and the card springs open, un-blurring its detail.
Hero ExpandHeroGrid(items) { thumbnail } detail: { }TapA thumbnail grows into a full detail card, morphing with matchedGeometryEffect.
Spotlight Card.spotlight()Hover / DragA soft glow follows the pointer across the card, like a torch.
Magnifying DockMagnifyingDock(items) { item in }Hover / DragIcons swell as the pointer passes over them, like the macOS Dock.
Jiggle.jiggle(isActive:)Loop / Value changeThe home-screen edit-mode wiggle, each item slightly out of step.
Fan StackFanStack(items, isSpread:) { item in }Tap / Value changeA pile of cards fans out like a hand of playing cards, and gathers back.
Scratch Card.scratchToReveal(_:onReveal:)DragRub away a scratch-off cover to reveal what's underneath.
Stacking Cards.stackingCard()ScrollCards stick at the top while scrolling and shrink as the next one covers them.
Deck ShuffleDeckShuffle(items, trigger:) { item in }Value change / TapA deck splits in two, mixes, and springs back into a messy stack.
Looping CarouselLoopingCarousel(items) { item in }Drag / LoopA paging carousel that wraps around forever, with peeking neighbours.
Drag to Dismiss.dragToDismiss(isPresented:)DragFling a card away; it flies off with your throw or springs back.
Shrinking Header.shrinkingHeader()ScrollThe header sticks to the top and shrinks as content scrolls under it.
Stretchy Header.stretchyHeader()ScrollA header image stretches when pulled down and drifts with parallax when scrolled.
Island PillIslandPill(isExpanded:) { } expanded: { }Tap / Value changeA black pill springs open into a card and back, its contents blurring across.
Hover Lift.hoverLift(isActive:)HoverCards rise, grow and lean towards the pointer on iPad and Mac.
Marquee WallMarqueeWall(count:) { index in }LoopA tilted wall of cards, columns scrolling endlessly up and down.
Photo Develop.photoDevelop()Appear / Value changeThe view develops like an instant photo, from murky dark to full colour.

Shape

EffectAPITriggerUse it for
Pulse RingsPulseRings()LoopConcentric rings expand and fade continuously, like a radar or live dot.
Like Burst.burst(trigger:)Tap / Value changeParticles fly outward from the centre when a value changes.
Checkmark DrawAnimatedCheckmark(isChecked:)Value changeA success mark draws itself: circle stroke, fill, then a popping check.
Confetti.confetti(trigger:)Tap / Value changeConfetti bursts out of the view, tumbles under gravity and fades.
LoadersMotionLoader(.spinner)LoopFive looping activity indicators: spinner, dots, bars, orbit and pulse.
Morphing BlobMorphingBlob()LoopAn organic, lava-lamp blob whose outline never stops changing.
Draw OnShape.drawOn()Appear / Value changeAny Shape strokes itself on like a pen, and erases back.
Progress RingProgressRing(progress:)Value changeA gradient ring springs to each value as the percentage rolls.
Skeleton.skeleton(isLoading:)Loop / Value changeA shimmering placeholder of the view's own layout while it loads.
Sliding TabsSlidingTabs([…], selection:)TapA segmented control whose pill or underline glides to the selection.
Reading ProgressReadingProgressScrollView { … }ScrollA bar along the top fills as you scroll through the content.

Background

EffectAPITriggerUse it for
AuroraAuroraBackground()LoopSoft, blurred colour blobs drift slowly behind your content.
Mesh Gradient (iOS 18+)AnimatedMeshGradient()LoopA 3×3 MeshGradient whose points drift so the colours flow like liquid.
Retro GridRetroGrid()LoopA synthwave floor: a perspective grid scrolling toward you.
Border Beam.borderBeam()LoopA short comet of light runs around the card's border forever.
WavesWaveBackground()LoopLayered sine waves roll across the bottom, back layers slower and paler.
Film Grain.grain()LoopFlickering film grain over any view, from a tiled noise texture.
Flashlight.flashlight()Hover / DragThe view goes dark except a soft circle of light around the pointer.
Lava LampLavaLamp()LoopSoft blobs drift up and down, stretching and merging like hot wax.
Matrix RainMatrixRain()LoopColumns of glyphs rain down with bright heads and fading trails.
Interactive Dot GridInteractiveDotGrid()Drag / Hover / LoopA grid of dots scatters away from your finger and eases back.
MeteorsMeteors()LoopMeteors streak across a starry sky with glowing heads and fading tails.
Flow FieldFlowField()LoopGenerative curves follow a shifting vector field with dashes flowing along them.
NetworkNetworkBackground()Loop / Hover / DragDrifting points link up with lines when close, and gather at your finger.
Topographic LinesTopographicLines()LoopContour lines of a shifting landscape flow like a living map.
Day & Night SkyDayNightSky(time:)Loop / Value changeA sky runs from starry night through dawn, noon and sunset, sun and moon arcing over.

Number

EffectAPITriggerUse it for
Rolling NumberRollingNumber(value:)Value changeDigits roll like an odometer when the value changes.
Split-Flap DisplaySplitFlapText(_:)Value changeCharacters flip through the alphabet like an airport departures board.
Slot MachineSlotMachineNumber(value:)Value changeNumber reels spin with motion blur and land one after another.
Price TickerPriceTicker(value:)Value changeDigits roll to the new price as the background flashes green or red.
Animated ChartGrowingBarChart(values:) / DrawingLineChart(values:)Appear / Value changeBars grow up one after another; a line draws itself left to right.
Needle GaugeNeedleGauge(value:)Value changeA speedometer needle swings to the value, overshoots and settles.
Contribution GridContributionGrid(values:)Appear / Value changeActivity squares pop in column by column, shaded by how busy each day was.
Analog ClockAnalogClock(date:)Loop / Value changeA clock with a sweeping second hand; set a time and the hands spring to it.

Particle & 3D

EffectAPITriggerUse it for
Particle FieldParticleField()LoopDrifting particles linked by faint lines, like a living constellation.
StarfieldStarfield()LoopStars stream out of the centre and stretch into streaks: warp speed.
Cover FlowCoverFlow(items) { item in }ScrollSide items turn away in 3D, shrink and dim; the centre faces you.
Float 3D.float3D()LoopThe view hovers: a gentle bob, a slow 3D sway and a breathing shadow.
FireworksFireworks()LoopRockets climb and burst into rings of falling, fading sparks.
Snowfall & RainSnowfall(.snow / .rain)LoopDrifting, swaying snowflakes or fast slanted rain, with depth.
Floating Reactions.floatingReactions(trigger:)Tap / Value changeLive-stream style emoji float up, swaying, every time you react.
Warp TunnelWarpTunnel()LoopRings rush out of the vanishing point toward you: flying down a tunnel.
Holographic Card.holographic()Hover / DragA trading card that tilts toward you with a rainbow foil and moving glare.
Physics EmojiPhysicsEmoji(trigger:)Value change / TapEmoji tumble in with gravity, bounce off each other and pile up.
Shatter.transition(.shatter)Value changeThe view breaks into triangular shards that fly, spin and fall away.
3D Cube.transition(.cube)Value changeViews swap by turning a cube: one face folds away as the next rotates in.
Dot GlobeDotGlobe()LoopA globe of evenly spread dots spins on a tilted axis, with pulsing cities.
BubblesBubbles()LoopSoap bubbles rise and wobble with rainbow rims and glossy highlights.
FirefliesFireflies()LoopGlowing fireflies drift lazily and blink on their own rhythms.
FlockFlock()Loop / Drag / HoverLittle arrows swim together like birds or fish, and chase your finger.
Ink Trail.inkTrail(color:)Drag / HoverThe pointer or finger leaves puffs of ink that swell, drift up and fade.
Rain on GlassRainOnGlass()LoopRaindrops cling to a window while bigger drops slide down in fits and starts.
OrbitsOrbits(colors:)LoopPlanets circle a glowing star on tilted orbits, passing behind it and in front.

Transition

EffectAPITriggerUse it for
Iris.transition(.iris)AppearA circle opens from a point to reveal the view, like a camera iris.
Blinds.transition(.blinds)AppearHorizontal slats open together to reveal the view, like Venetian blinds.
Clock Wipe.transition(.clockWipe)AppearA wedge sweeps clockwise from twelve o'clock, like a clock hand.
Pixel Dissolve.transition(.dissolve)AppearThe view appears and vanishes in square pixels, in random order.
Poof.transition(.poof)AppearThe view puffs away like smoke: it swells and blurs out.
Swoosh.transition(.swoosh)AppearThe view whooshes in leaning forward, with a motion blur.
Film Exposure.transition(.filmExposure)AppearThe view develops like a photo, from over-exposed white to full colour.
Circular RevealCircularReveal(value:) { value in }Tap / Value changeNew content spreads out in a circle from where you tapped.
Liquid Swipe.transition(.liquidSwipe)Value changeThe next page pours in from the edge behind a bulging liquid wave.
Page Turn.transition(.pageTurn)Value changeThe old page swings away like a book page, revealing the next one.
Glitch Transition.transition(.glitch)Value changeThe view breaks up like a bad signal on its way in or out.
Origami Fold.transition(.origami)Value changeThe view folds up into creased panels like a paper map.
Ink Bleed.transition(.inkBleed)Value changeNew content spreads in like a blot of ink on wet paper, with a ragged edge.
Zoom Blur.transition(.zoomBlur)Value changeContent rushes in from the camera, blurred and trailed by echoes, then snaps sharp.

Shader

EffectAPITriggerUse it for
Water Ripple.waterRippleOnTap() / .waterRipple(at:trigger:)Tap / Value changeA real ripple distorts the view's pixels outward from a tap.
Pixellate.pixellate(_:)Value changeThe view melts into a mosaic of square blocks and back.
Chromatic Aberration.chromaticAberration(_:)Value change / LoopRed and blue split sideways like a cheap lens; animate it on a beat.
CRT Screen.crtScreen()LoopCurved glass, scanlines, a rolling band and flicker, like an old monitor.
Heat Haze.heatHaze(strength:)LoopThe view shimmers like hot air over a desert road.
Noise Dissolve.noiseDissolve(_:) / .transition(.noiseDissolve)Value changeThe view burns away in organic blotches with a glowing edge.
Disintegrate.disintegrate(_:) / .transition(.disintegrate)Value changeThe view crumbles into grains of sand that blow away on the wind.
Genie.genie(_:toward:) / .transition(.genie)Value changeThe view pinches and pours into a point below it, like minimising a window.
Glass Lens.glassLensOnDrag() / .glassLens(at:)Drag / HoverA round glass lens magnifies what's under it, bending light at its rim.
Swirl.swirlOnDrag() / .swirl(at:strength:)Drag / Value changeThe view twists around a point like water going down a drain.
Kaleidoscope.kaleidoscope(segments:)Loop / Value changeOne wedge of the view mirrored round the centre, turning into new patterns.
Halftone.halftone(dotSize:)Value changeThe view is printed in round dots, bigger where it's darker, like newsprint.
Dither.dither(pixelSize:palette:)Value changeChunky pixels in a few flat colours with a Bayer cross-hatch, like a retro handheld.
Thermal Vision.thermal(_:)Value changeBrightness turns into heat colours, from cold indigo to white hot.
Flag Wave.flagWave()LoopThe view ripples like a flag on a pole, its folds catching the light.
Voronoi CellsVoronoiCells(colors:)LoopSlowly drifting cells like stained glass, with soft seams between them.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.