con un clic
animate
// Add purposeful motion to a UXSpec — $animations, onEnter choreography, and timing tokens
// Add purposeful motion to a UXSpec — $animations, onEnter choreography, and timing tokens
Improve every piece of text in a UXSpec — descriptions, labels, error messages, empty states, and loading copy
Identify repeated patterns and consolidate them into $elements and shared tokens for systematic reuse
Collect design context, audience, intent, and requirements before writing any UXSpec JSON
Strengthen a UXSpec against real-world conditions — overflow, missing data, network failures, and accessibility
Run a systematic quality audit on a completed UXSpec — design intent, consistency, accessibility, and state coverage
Walk through building a UXSpec (.uxspec.json) file — gathering requirements, making design decisions about layout/typography/color/motion/accessibility, designing the state machine, defining visuals, then compiling and verifying the output.
| name | animate |
| description | Add purposeful motion to a UXSpec — $animations, onEnter choreography, and timing tokens |
Add purposeful motion to a UXSpec — $animations, onEnter choreography, and timing tokens. Motion should communicate, not decorate.
When a spec feels static or abrupt. When state transitions need smoothing. When the user asks for animation, micro-interactions, or polish.
| Category | Duration | Use for |
|---|---|---|
| Instant feedback | 100–150ms | Button press, toggle, selection change |
| State change | 200–300ms | Hover effect, menu open/close, tab switch |
| Layout shift | 300–500ms | Accordion, modal, drawer, page transition |
| Entrance | 500–800ms | Initial page load, hero reveal |
| Exit | ~75% of entrance | Things should leave faster than they arrive |
Define these as $tokens.timing values so they're consistent across the spec.
ease-out-quart, ease-out-expo — natural deceleration, things arrive smoothly.bounce, elastic — feel dated and gimmicky. linear — feels mechanical.ease-in or ease-in-out — things accelerate away.$animations BlockNamed keyframe definitions referenced from $visual.onEnter:
"$animations": {
"slide-up": {
"$description": "Content slides up and fades in on state entry",
"duration": "{timing.entrance}",
"easing": "ease-out",
"keyframes": {
"0": { "opacity": 0, "translateY": 16 },
"100": { "opacity": 1, "translateY": 0 }
}
}
}
onEnter ChoreographyEach $visual can specify what happens when the state is entered:
"onEnter": {
"focus": "email-input",
"animation": "slide-up"
}
Decisions:
Always design a reduced-motion alternative. This isn't optional.
$description: "On reduced motion: content appears instantly with no slide."Motion in a UXSpec is metadata, not decoration. It tells the implementer how a state change should feel. A spec without motion isn't wrong — but a spec with thoughtful motion communicates more clearly what the designer intended.