/officialunofficial-skills:apple-designfrom Official Unofficial Skills
Applies Apple's fluid, physical interface principles to the web: gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum, interruptible transitions, rubber-banding, translucent materials, and reduced motion.
Ships in Official Unofficial Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
These rules come from Apple's WWDC design talks, mainly Designing Fluid Interfaces (2018), translated to CSS, Pointer Events, requestAnimationFrame and spring libraries such as Motion.
An interface feels fluid when it behaves like a physical object. Motion starts from the value on screen, takes the velocity of the user, projects momentum forward, and can be grabbed and reversed at any instant. Springs make this natural, because a spring is interruptible and knows its velocity.
For the build order of a web animation use animate. For React Native use animate-expo.
Lag ends the feeling of directness, so remove it first.
.button:active {
transform: scale(0.97);
transition: transform 100ms ease-out;
}
A dragged element stays under the finger, at the offset where the user grabbed it. A snap to the element center on grab breaks the illusion.
setPointerCapture, so tracking continues when the pointer leaves the element.pointermove events. You need velocity at release.el.addEventListener('pointerdown', (e) => {
el.setPointerCapture(e.pointerId);
const grabOffset = e.clientY - el.getBoundingClientRect().top;
// record position and timestamp on each pointermove
});
This is the most important rule. The user can grab a moving element mid-flight and reverse it. A modal that is closing follows the finger when grabbed. It does not finish closing first.
@keyframes for motion that a gesture drives. They cannot be grabbed and reversed smoothly.A scripted animation with a fixed duration cannot respond to new input. A spring can: new input changes the target and the motion stays continuous. Use a spring for anything the user can touch.
Think in two parameters, not in mass, stiffness and damping:
1.0 settles with no bounce. Below 1.0 it overshoots, and lower is bouncier.Default to damping 1.0. Add bounce (damping about 0.8) only when the gesture carried momentum: a flick, a throw, a drag release. Overshoot suits a card the user flicked, not a menu that faded in.
| Interaction | Damping | Response |
|---|---|---|
| Move or reposition, for example picture in picture | 1.0 | 0.4 |
| Rotation | 0.8 | 0.4 |
| Drawer, sheet | 0.8 | 0.3 |
In Motion, the bounce and duration spring options map closely to damping and response:
import { animate } from 'motion';
// Default: no overshoot
animate(el, { y: 0 }, { type: 'spring', bounce: 0, duration: 0.4 });
// After a flick: a little bounce
animate(el, { y: target }, { type: 'spring', bounce: 0.2, duration: 0.4 });
When the gesture ends, the animation continues at the velocity of the finger. No seam shows between the drag and the animation. This detail does the most to separate fluid from adequate.
Pass the release velocity to the spring as its initial velocity. Motion takes absolute px/s in the velocity option. Some APIs want relative velocity:
relativeVelocity = gestureVelocity / (targetValue - currentValue)
Example: the element is at y=50, the target is y=150 and the finger moves at 50px/s. The initial velocity is 50 / 100 = 0.5.
Do not snap to the boundary nearest the release point. Project where the gesture was going, as scroll deceleration does, and snap to the target nearest that point. A flick then throws the element.
// decelerationRate: 0.998 for a normal scroll feel, 0.99 for a snappier one
function project(initialVelocity /* px/s */, decelerationRate = 0.998) {
return (initialVelocity / 1000) * decelerationRate / (1 - decelerationRate);
}
const projectedEnd = currentPosition + project(releaseVelocity);
const target = nearestSnapPoint(projectedEnd);
animateSpringTo(target, { velocity: releaseVelocity });
Use this exponential decay form, not the textbook v^2 / (2 * decel). At release, decide between reverse and commit from the sign of the velocity, not from the position.
At an edge, resist more as the drag goes further. A hard stop reads as frozen. Resistance reads as responsive with nothing more to show.
function rubberband(overshoot, dimension, constant = 0.55) {
return (overshoot * dimension * constant) / (dimension + constant * Math.abs(overshoot));
}
transform-origin to the trigger, so the relation between button and content is clear.swipeleft event. They discard the tracking that feedback needs.transform and opacity, driven by requestAnimationFrame or the compositor. Add will-change where motion is about to start.Reduced motion means a gentler equivalent, not the absence of feedback. Build these three signals into each component:
prefers-reduced-motion: reduce: replace slides, springs and parallax with short cross-fades. Drop overshoot. Keep the opacity and color changes that explain a state.prefers-reduced-transparency: reduce: make translucent surfaces solid. Raise the background opacity and drop the blur.prefers-contrast: more: use near-solid backgrounds with a clear border.@media (prefers-reduced-motion: reduce) {
.sheet { transition: opacity 200ms ease; transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
.toolbar { background: white; backdrop-filter: none; }
}
For every user, avoid backgrounds that move across the full viewport, slow loops near one cycle per 5 seconds, and sudden brightness jumps. Ease a change between dark and light themes. Make a large object semi-transparent while it travels.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub officialunofficial/skills --plugin officialunofficial-skills85 skills in this plugin
/alignmentMeasures a running page for edges, gaps, centres and radii that miss by a pixel or two, judges visual weight, and returns a numbered report with proof./animateBuilds a web animation from scratch and writes the code. Decides in order whether it should animate at all, its purpose, the tool, the properties, the easing and duration or spring, how it interrupts and exits, and reduced motion. Use when asked to animate something, add motion, build a transition, or make a component feel alive. For React Native or Expo use animate-expo. To critique existing motion use review-animations. To audit a whole codebase use improve-animations./animate-expoOther plugins' skills for the same job