@istmx/skills 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -20
- package/bin/cli.js +50 -24
- package/istm-animate/SKILL.md +31 -26
- package/istm-animate/core/motion-principles/SKILL.md +284 -0
- package/istm-animate/core/motion-principles/references/designers.md +127 -0
- package/istm-animate/core/motion-principles/references/easing-guide.md +231 -0
- package/istm-animate/core/motion-principles/references/enter-exit-recipes.md +466 -0
- package/istm-animate/frameworks/canvas-generative/SKILL.md +325 -0
- package/istm-animate/frameworks/canvas-generative/references/algorithms.md +925 -0
- package/istm-animate/frameworks/css-native/SKILL.md +319 -0
- package/istm-animate/frameworks/css-native/references/modern-css.md +465 -0
- package/istm-animate/frameworks/framer-motion/SKILL.md +187 -0
- package/istm-animate/frameworks/framer-motion/references/api.md +312 -0
- package/istm-animate/frameworks/gsap/SKILL.md +188 -0
- package/istm-animate/frameworks/gsap/references/core.md +218 -0
- package/istm-animate/frameworks/gsap/references/plugins.md +371 -0
- package/istm-animate/frameworks/gsap/references/scrolltrigger.md +325 -0
- package/istm-animate/frameworks/gsap/references/timeline.md +218 -0
- package/istm-animate/frameworks/threejs-r3f/SKILL.md +243 -0
- package/istm-animate/frameworks/threejs-r3f/references/scene-setup.md +392 -0
- package/istm-animate/frameworks/threejs-r3f/references/shaders.md +446 -0
- package/istm-animate/mobile/android/compose-graphics/SKILL.md +503 -0
- package/istm-animate/mobile/android/compose-graphics/references/agsl-recipes.md +356 -0
- package/istm-animate/mobile/android/compose-graphics/references/canvas-generative.md +282 -0
- package/istm-animate/mobile/android/compose-graphics/references/m3-expressive-deep.md +303 -0
- package/istm-animate/mobile/android/compose-motion/SKILL.md +359 -0
- package/istm-animate/mobile/android/compose-motion/references/gestures-compose.md +273 -0
- package/istm-animate/mobile/android/compose-motion/references/recomposition-and-anim.md +196 -0
- package/istm-animate/mobile/android/compose-motion/references/shared-transitions.md +281 -0
- package/istm-animate/mobile/android/compose-multiplatform/SKILL.md +311 -0
- package/istm-animate/mobile/android/compose-multiplatform/references/cmp-interop.md +288 -0
- package/istm-animate/mobile/android/compose-multiplatform/references/cmp-platform-quirks.md +156 -0
- package/istm-animate/mobile/apple/swiftui-graphics/SKILL.md +408 -0
- package/istm-animate/mobile/apple/swiftui-graphics/references/canvas-swiftui.md +239 -0
- package/istm-animate/mobile/apple/swiftui-graphics/references/liquid-glass-deep.md +252 -0
- package/istm-animate/mobile/apple/swiftui-graphics/references/metal-recipes.md +382 -0
- package/istm-animate/mobile/apple/swiftui-motion/SKILL.md +379 -0
- package/istm-animate/mobile/apple/swiftui-motion/references/gestures-swiftui.md +336 -0
- package/istm-animate/mobile/apple/swiftui-motion/references/phase-keyframe-deep.md +231 -0
- package/istm-animate/mobile/apple/swiftui-motion/references/springs-cheatsheet.md +129 -0
- package/istm-animate/references/animate.md +199 -0
- package/istm-animate/references/audit.md +115 -0
- package/istm-animate/references/design-engineering.md +674 -0
- package/istm-animate/references/improve.md +101 -0
- package/istm-animate/references/opportunities.md +132 -0
- package/istm-animate/references/plan-template.md +73 -0
- package/istm-animate/references/recipes.md +324 -0
- package/istm-animate/references/review.md +112 -0
- package/istm-animate/references/standards.md +187 -0
- package/istm-animate/references/vocabulary.md +173 -0
- package/istm-awwward-designer/SKILL.md +29 -17
- package/istm-design/SKILL.md +31 -59
- package/istm-design/core/design-audit/SKILL.md +248 -0
- package/istm-design/core/desktop-principles/SKILL.md +363 -0
- package/istm-design/core/desktop-principles/references/keyboard-patterns.md +137 -0
- package/istm-design/core/desktop-principles/references/multi-window.md +105 -0
- package/istm-design/core/mobile-principles/SKILL.md +289 -0
- package/istm-design/core/mobile-principles/references/accessibility-mobile.md +175 -0
- package/istm-design/core/mobile-principles/references/gestures-deep.md +220 -0
- package/istm-design/core/ui-ux-pro-max/SKILL.md +392 -0
- package/istm-design/core/ui-ux-pro-max/UPSTREAM.md +23 -0
- package/istm-design/core/ui-ux-pro-max/data/app-interface.csv +31 -0
- package/istm-design/core/ui-ux-pro-max/data/charts.csv +26 -0
- package/istm-design/core/ui-ux-pro-max/data/colors.csv +193 -0
- package/istm-design/core/ui-ux-pro-max/data/google-fonts.csv +1924 -0
- package/istm-design/core/ui-ux-pro-max/data/icons.csv +106 -0
- package/istm-design/core/ui-ux-pro-max/data/landing.csv +35 -0
- package/istm-design/core/ui-ux-pro-max/data/motion.csv +17 -0
- package/istm-design/core/ui-ux-pro-max/data/products.csv +193 -0
- package/istm-design/core/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/angular.csv +51 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/avalonia.csv +57 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/javafx.csv +76 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/laravel.csv +51 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/nuxt-ui.csv +71 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/threejs.csv +54 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/uno.csv +60 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/uwp.csv +56 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/winui.csv +60 -0
- package/istm-design/core/ui-ux-pro-max/data/stacks/wpf.csv +57 -0
- package/istm-design/core/ui-ux-pro-max/data/styles.csv +85 -0
- package/istm-design/core/ui-ux-pro-max/data/typography.csv +75 -0
- package/istm-design/core/ui-ux-pro-max/data/ui-reasoning.csv +162 -0
- package/istm-design/core/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/istm-design/core/ui-ux-pro-max/references/pro-rules.md +109 -0
- package/istm-design/core/ui-ux-pro-max/references/quick-reference.md +240 -0
- package/istm-design/core/ui-ux-pro-max/scripts/core.py +464 -0
- package/istm-design/core/ui-ux-pro-max/scripts/design_system.py +1371 -0
- package/istm-design/core/ui-ux-pro-max/scripts/search.py +162 -0
- package/istm-design/core/ui-ux-pro-max/scripts/tests/test_core.py +134 -0
- package/istm-design/core/ui-ux-pro-max/scripts/validate_data.py +114 -0
- package/istm-design/references/apple-design.md +282 -0
- package/istm-design/references/generation-guide.md +209 -0
- package/istm-design/references/pick-ui-library.md +77 -0
- package/istm-design/references/picker.md +197 -0
- package/istm-design/references/prototype.md +90 -0
- package/istm-design/references/schema.md +366 -0
- package/package.json +1 -1
- package/RELEASE_v1.2.0.md +0 -40
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Designer Reference Profiles
|
|
2
|
+
|
|
3
|
+
Three design philosophies that define modern motion on the web.
|
|
4
|
+
Use this to calibrate the animation intensity and style for a given project.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Emil Kowalski
|
|
9
|
+
|
|
10
|
+
### Philosophy
|
|
11
|
+
|
|
12
|
+
Motion should be invisible. The best animation is one the user never consciously notices -- it just makes the interface feel "right." Every millisecond of duration and every pixel of displacement must earn its place. If removing an animation makes the UI feel the same, the animation was wrong.
|
|
13
|
+
|
|
14
|
+
### Signatures
|
|
15
|
+
|
|
16
|
+
- **Micro-transitions:** opacity + translateY(2-6px), never more
|
|
17
|
+
- **Ultra-short springs:** stiffness 400+, damping 30+, near-zero overshoot
|
|
18
|
+
- **Durations:** 100-200ms, rarely exceeds 250ms
|
|
19
|
+
- **Easing:** ease-out or critically-damped springs
|
|
20
|
+
- **No blur, no scale, no rotation** on standard UI elements
|
|
21
|
+
- **Stagger:** 30-50ms, barely perceptible
|
|
22
|
+
- **Exit:** faster than enter, often just opacity fade in 100ms
|
|
23
|
+
|
|
24
|
+
### When to Channel Kowalski
|
|
25
|
+
|
|
26
|
+
- User performs an action 10+ times per session
|
|
27
|
+
- The animation accompanies a frequent interaction (toggle, dropdown, tab)
|
|
28
|
+
- The product's identity is "fast" or "professional"
|
|
29
|
+
- You want the UI to feel polished without anyone being able to point at why
|
|
30
|
+
|
|
31
|
+
### Key Principle
|
|
32
|
+
|
|
33
|
+
> "The animation should feel like it was always there."
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Jakub Krehel
|
|
38
|
+
|
|
39
|
+
### Philosophy
|
|
40
|
+
|
|
41
|
+
Motion is a storytelling medium. Every transition should feel intentional and crafted -- like a camera movement in film. Blur, scale, and layered timing create depth and dimensionality. The interface isn't flat; it's a stage where elements perform choreographed entrances and exits.
|
|
42
|
+
|
|
43
|
+
### Signatures
|
|
44
|
+
|
|
45
|
+
- **Layered transitions:** opacity + translateY(8-16px) + blur(4-8px) simultaneously
|
|
46
|
+
- **Blur as depth cue:** entering elements are "out of focus" then sharpen
|
|
47
|
+
- **Medium springs:** stiffness 150-250, damping 15-25, gentle overshoot
|
|
48
|
+
- **Durations:** 300-500ms, comfortable for storytelling
|
|
49
|
+
- **Stagger:** 60-100ms, clearly visible choreography
|
|
50
|
+
- **Clip-path reveals:** sections revealed through geometric masks
|
|
51
|
+
- **Parallax layers:** foreground/background at different scroll speeds
|
|
52
|
+
- **Exit:** mirrors enter but compressed (60-70% of enter duration), blur increases
|
|
53
|
+
|
|
54
|
+
### When to Channel Krehel
|
|
55
|
+
|
|
56
|
+
- First impression matters (landing pages, portfolios, hero sections)
|
|
57
|
+
- The product's identity is "premium" or "crafted"
|
|
58
|
+
- Content is consumed, not manipulated (editorial, showcase)
|
|
59
|
+
- You have room for 300ms+ without blocking user flow
|
|
60
|
+
|
|
61
|
+
### Key Principle
|
|
62
|
+
|
|
63
|
+
> "Every element deserves a moment on stage."
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Jhey Tompkins
|
|
68
|
+
|
|
69
|
+
### Philosophy
|
|
70
|
+
|
|
71
|
+
The web should spark joy. Animation is not just functional polish -- it's personality, surprise, and delight. Scale, rotation, color shifts, and elastic physics make interfaces feel alive and playful. Rules exist to be bent (not broken). The unexpected is the reward.
|
|
72
|
+
|
|
73
|
+
### Signatures
|
|
74
|
+
|
|
75
|
+
- **Scale + rotation combos:** elements spin, bounce, pop in
|
|
76
|
+
- **Elastic/bounce easing:** intentional overshoot, wobble
|
|
77
|
+
- **Color shifts:** hue rotation, gradient animations during transitions
|
|
78
|
+
- **SVG path animations:** morphing shapes, drawing strokes
|
|
79
|
+
- **3D transforms:** perspective flips, card rotations
|
|
80
|
+
- **Easter eggs:** hover states that surprise, scroll-triggered delights
|
|
81
|
+
- **Custom properties animations:** `@property` for animating gradients, counters
|
|
82
|
+
- **Durations:** 400-800ms, the animation IS the experience
|
|
83
|
+
- **Stagger:** 60-100ms with bounce, creates a "wave" effect
|
|
84
|
+
|
|
85
|
+
### When to Channel Jhey
|
|
86
|
+
|
|
87
|
+
- The brand is playful, young, or creative
|
|
88
|
+
- Onboarding flows where engagement > speed
|
|
89
|
+
- Marketing pages where "wow factor" converts
|
|
90
|
+
- Game UI, kids apps, creative tools
|
|
91
|
+
- Easter eggs and micro-delights in any product
|
|
92
|
+
|
|
93
|
+
### Key Principle
|
|
94
|
+
|
|
95
|
+
> "If it doesn't make you smile, animate it differently."
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Weighting Table by Project Type
|
|
100
|
+
|
|
101
|
+
Use this to decide which philosophy drives the motion design. **Primary** sets the overall feel, **Secondary** adds depth in key moments, **Selective** is used sparingly for specific contexts.
|
|
102
|
+
|
|
103
|
+
| Project Type | Primary | Secondary | Selective |
|
|
104
|
+
|---|---|---|---|
|
|
105
|
+
| SaaS / Productivity | Kowalski | Krehel | Jhey (onboarding, empty states) |
|
|
106
|
+
| Portfolio / Creative | Krehel | Jhey | Kowalski (nav, forms) |
|
|
107
|
+
| E-commerce | Kowalski | Krehel (product pages) | Jhey (promos, seasonal) |
|
|
108
|
+
| Landing page | Krehel | Jhey (CTAs, social proof) | Kowalski (pricing, FAQ) |
|
|
109
|
+
| Kids / Playful | Jhey | Krehel (storytelling) | Kowalski (forms, settings) |
|
|
110
|
+
| Developer tools | Kowalski | -- | Krehel (docs, changelog) |
|
|
111
|
+
| Editorial / Magazine | Krehel | Kowalski (reading UI) | Jhey (interactive pieces) |
|
|
112
|
+
| Dashboard / Analytics | Kowalski | -- | Krehel (data viz transitions) |
|
|
113
|
+
| Mobile app (React Native) | Kowalski | Krehel (onboarding) | Jhey (achievements) |
|
|
114
|
+
|
|
115
|
+
### How to Read the Table
|
|
116
|
+
|
|
117
|
+
- **Primary (70-80% of animations):** This style governs the default motion language. Every component starts here.
|
|
118
|
+
- **Secondary (15-25%):** Used for key moments -- first impressions, important state changes, section transitions.
|
|
119
|
+
- **Selective (5-10%):** Reserved for specific contexts noted in parentheses. Overuse kills the effect.
|
|
120
|
+
|
|
121
|
+
### Mixing Styles -- Rules
|
|
122
|
+
|
|
123
|
+
1. **Never mix styles within a single animation.** One element = one philosophy.
|
|
124
|
+
2. **Transition between styles at section boundaries.** Hero (Krehel) then content area (Kowalski) = fine.
|
|
125
|
+
3. **The more interactive the element, the more Kowalski it should be.** Buttons, inputs, toggles are always snappy.
|
|
126
|
+
4. **The more "look at me" the element, the more Jhey it can be.** Badges, confetti, achievements, celebrations.
|
|
127
|
+
5. **When in doubt, go Kowalski.** Subtle is always safer than expressive.
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# Easing Guide
|
|
2
|
+
|
|
3
|
+
Complete reference for easing functions across CSS, GSAP, and Framer Motion.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## CSS Easings
|
|
8
|
+
|
|
9
|
+
### Built-in Keywords
|
|
10
|
+
|
|
11
|
+
| Keyword | cubic-bezier | When to Use | Feel |
|
|
12
|
+
|---|---|---|---|
|
|
13
|
+
| `ease` | `(0.25, 0.1, 0.25, 1.0)` | General-purpose default | Smooth, slightly fast start |
|
|
14
|
+
| `ease-in` | `(0.42, 0, 1.0, 1.0)` | **Exits only.** Element leaving the screen | Slow start, fast end (accelerating away) |
|
|
15
|
+
| `ease-out` | `(0, 0, 0.58, 1.0)` | **Entries.** Element appearing on screen | Fast start, smooth landing |
|
|
16
|
+
| `ease-in-out` | `(0.42, 0, 0.58, 1.0)` | State changes (color, position shift) | Symmetric acceleration/deceleration |
|
|
17
|
+
| `linear` | `(0, 0, 1.0, 1.0)` | Scroll-synced, progress bars, spinners | Mechanical, constant speed |
|
|
18
|
+
|
|
19
|
+
### Common cubic-bezier Recipes
|
|
20
|
+
|
|
21
|
+
| Name | Value | Use Case |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| Snappy UI | `cubic-bezier(0.2, 0, 0, 1)` | Modals, drawers, fast UI |
|
|
24
|
+
| Material Design Standard | `cubic-bezier(0.4, 0, 0.2, 1)` | General Material transitions |
|
|
25
|
+
| Material Decelerate | `cubic-bezier(0, 0, 0.2, 1)` | Entries in Material Design |
|
|
26
|
+
| Material Accelerate | `cubic-bezier(0.4, 0, 1, 1)` | Exits in Material Design |
|
|
27
|
+
| Apple ease | `cubic-bezier(0.25, 0.1, 0.25, 1)` | iOS-style smooth transitions |
|
|
28
|
+
| Vercel/Geist | `cubic-bezier(0.16, 1, 0.3, 1)` | Snappy with soft landing |
|
|
29
|
+
| Overshoot | `cubic-bezier(0.34, 1.56, 0.64, 1)` | Playful entries, slight bounce past target |
|
|
30
|
+
| Dramatic exit | `cubic-bezier(0.55, 0, 1, 0.45)` | Fast aggressive exit |
|
|
31
|
+
|
|
32
|
+
```css
|
|
33
|
+
/* Example: snappy modal entry */
|
|
34
|
+
.modal {
|
|
35
|
+
transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1),
|
|
36
|
+
opacity 0.25s cubic-bezier(0.2, 0, 0, 1);
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### CSS linear() Function
|
|
41
|
+
|
|
42
|
+
Creates custom easing curves with multiple stops. Useful for spring-like or bounce effects in pure CSS.
|
|
43
|
+
|
|
44
|
+
```css
|
|
45
|
+
/* Spring-like bounce */
|
|
46
|
+
.bounce-enter {
|
|
47
|
+
transition: transform 0.5s linear(
|
|
48
|
+
0, 0.004, 0.016, 0.035, 0.063, 0.098, 0.141, 0.191,
|
|
49
|
+
0.25, 0.316, 0.391, 0.473, 0.562, 0.659, 0.763, 0.876,
|
|
50
|
+
1, 1.097, 1.159, 1.185, 1.176, 1.142, 1.092, 1.035,
|
|
51
|
+
0.984, 0.946, 0.925, 0.92, 0.929, 0.946, 0.969, 0.991,
|
|
52
|
+
1.006, 1.015, 1.017, 1.013, 1.006, 1
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
> **Tool:** Use [linear-easing-generator.netlify.app](https://linear-easing-generator.netlify.app/) to convert spring configs to `linear()`.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## GSAP Easings
|
|
62
|
+
|
|
63
|
+
GSAP uses string-based easing: `"power2.out"`, `"back.inOut"`, `"elastic.out(1, 0.3)"`.
|
|
64
|
+
|
|
65
|
+
### Power Easings
|
|
66
|
+
|
|
67
|
+
| Ease | Intensity | Equivalent CSS | Best For |
|
|
68
|
+
|---|---|---|---|
|
|
69
|
+
| `power1` (a.k.a. `quad`) | Subtle | Close to `ease` | Subtle UI transitions |
|
|
70
|
+
| `power2` (a.k.a. `cubic`) | Medium | Close to `ease-out` | General purpose, entries |
|
|
71
|
+
| `power3` (a.k.a. `quart`) | Strong | More aggressive | Dramatic reveals |
|
|
72
|
+
| `power4` (a.k.a. `quint`) | Very strong | Very aggressive | Hero animations, impact |
|
|
73
|
+
| `none` / `linear` | Zero | `linear` | Scroll-driven |
|
|
74
|
+
|
|
75
|
+
**Suffix rules:** `.out` = entry, `.in` = exit, `.inOut` = state change.
|
|
76
|
+
|
|
77
|
+
```js
|
|
78
|
+
// Subtle card entry
|
|
79
|
+
gsap.from('.card', { opacity: 0, y: 20, duration: 0.4, ease: "power2.out" });
|
|
80
|
+
|
|
81
|
+
// Dramatic hero reveal
|
|
82
|
+
gsap.from('.hero', { opacity: 0, y: 60, duration: 0.8, ease: "power4.out" });
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Special Easings
|
|
86
|
+
|
|
87
|
+
| Ease | Config | Feel | Use Case |
|
|
88
|
+
|---|---|---|---|
|
|
89
|
+
| `back` | `back.out(1.7)` | Overshoots then settles | Playful entries, modals |
|
|
90
|
+
| `bounce` | `bounce.out` | Bounces at the end | Game UI, notifications, playful |
|
|
91
|
+
| `elastic` | `elastic.out(1, 0.3)` | Spring-like wobble | Attention-grabbing, fun UI |
|
|
92
|
+
| `slow` | `slow(0.7, 0.7, false)` | Slow middle section | Cinematic reveals |
|
|
93
|
+
| `steps` | `steps(12)` | Frame-by-frame | Sprite animations, retro |
|
|
94
|
+
| `rough` | `rough({ strength: 1, points: 20, ... })` | Shaky/glitchy | Horror, distortion effects |
|
|
95
|
+
| `circ` | `circ.out` | Circular motion curve | Natural motion arcs |
|
|
96
|
+
| `expo` | `expo.out` | Very fast then very slow | Snappy professional UI |
|
|
97
|
+
|
|
98
|
+
```js
|
|
99
|
+
// Playful notification bounce
|
|
100
|
+
gsap.from('.notification', {
|
|
101
|
+
y: -100,
|
|
102
|
+
duration: 0.6,
|
|
103
|
+
ease: "back.out(1.7)"
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
// Elastic attention-grab
|
|
107
|
+
gsap.from('.badge', {
|
|
108
|
+
scale: 0,
|
|
109
|
+
duration: 0.8,
|
|
110
|
+
ease: "elastic.out(1, 0.3)"
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
// Cinematic title reveal
|
|
114
|
+
gsap.from('.title', {
|
|
115
|
+
opacity: 0,
|
|
116
|
+
y: 40,
|
|
117
|
+
duration: 1.2,
|
|
118
|
+
ease: "expo.out"
|
|
119
|
+
});
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Custom Ease
|
|
123
|
+
|
|
124
|
+
```js
|
|
125
|
+
// Register a reusable custom ease
|
|
126
|
+
gsap.registerEase("mySnap", function(progress) {
|
|
127
|
+
return Math.round(progress * 10) / 10; // Snap to 10 steps
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
gsap.to('.el', { x: 200, ease: "mySnap" });
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Spring Configs
|
|
136
|
+
|
|
137
|
+
Springs produce natural, physics-based motion. No fixed duration -- the spring resolves when it reaches equilibrium.
|
|
138
|
+
|
|
139
|
+
### Framer Motion Springs
|
|
140
|
+
|
|
141
|
+
Three parameters: `stiffness`, `damping`, `mass`.
|
|
142
|
+
|
|
143
|
+
| Preset | Stiffness | Damping | Mass | Feel | Use Case |
|
|
144
|
+
|---|---|---|---|---|---|
|
|
145
|
+
| Snappy UI | 400 | 30 | 1 | Fast, no overshoot | Buttons, toggles, menus |
|
|
146
|
+
| Default | 100 | 10 | 1 | Noticeable bounce | General entries |
|
|
147
|
+
| Gentle | 120 | 14 | 1 | Soft landing | Cards, modals |
|
|
148
|
+
| Bouncy | 600 | 15 | 1 | Strong overshoot | Playful, attention-grab |
|
|
149
|
+
| Slow | 50 | 10 | 1 | Sluggish, heavy | Large elements, page transitions |
|
|
150
|
+
| Heavy | 200 | 20 | 2 | Weighty, deliberate | Drag-and-drop, physics-sim |
|
|
151
|
+
|
|
152
|
+
```tsx
|
|
153
|
+
// Snappy button
|
|
154
|
+
<motion.button
|
|
155
|
+
whileTap={{ scale: 0.97 }}
|
|
156
|
+
transition={{ type: "spring", stiffness: 400, damping: 30 }}
|
|
157
|
+
/>
|
|
158
|
+
|
|
159
|
+
// Bouncy modal entry
|
|
160
|
+
<motion.div
|
|
161
|
+
initial={{ opacity: 0, scale: 0.95, y: 10 }}
|
|
162
|
+
animate={{ opacity: 1, scale: 1, y: 0 }}
|
|
163
|
+
transition={{ type: "spring", stiffness: 300, damping: 20 }}
|
|
164
|
+
/>
|
|
165
|
+
|
|
166
|
+
// Gentle card
|
|
167
|
+
<motion.div
|
|
168
|
+
initial={{ opacity: 0, y: 20 }}
|
|
169
|
+
animate={{ opacity: 1, y: 0 }}
|
|
170
|
+
transition={{ type: "spring", stiffness: 120, damping: 14 }}
|
|
171
|
+
/>
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Duration-based spring shorthand:**
|
|
175
|
+
|
|
176
|
+
```tsx
|
|
177
|
+
// Framer Motion also accepts duration + bounce (0 = no bounce, 1 = max bounce)
|
|
178
|
+
<motion.div
|
|
179
|
+
transition={{ type: "spring", duration: 0.4, bounce: 0.2 }}
|
|
180
|
+
/>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### GSAP Spring-like Behavior
|
|
184
|
+
|
|
185
|
+
GSAP does not have a true spring system, but you can approximate springs:
|
|
186
|
+
|
|
187
|
+
**Option 1: `elastic` ease**
|
|
188
|
+
```js
|
|
189
|
+
gsap.from('.el', {
|
|
190
|
+
scale: 0.95,
|
|
191
|
+
opacity: 0,
|
|
192
|
+
duration: 0.8,
|
|
193
|
+
ease: "elastic.out(1, 0.4)" // amplitude, period
|
|
194
|
+
});
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Option 2: `back` ease (subtle overshoot)**
|
|
198
|
+
```js
|
|
199
|
+
gsap.from('.el', {
|
|
200
|
+
y: 20,
|
|
201
|
+
opacity: 0,
|
|
202
|
+
duration: 0.5,
|
|
203
|
+
ease: "back.out(1.4)" // overshoot amount
|
|
204
|
+
});
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Option 3: InertiaPlugin (true physics)**
|
|
208
|
+
```js
|
|
209
|
+
// Requires InertiaPlugin (Club GSAP)
|
|
210
|
+
gsap.to('.el', {
|
|
211
|
+
inertia: {
|
|
212
|
+
x: 500, // velocity
|
|
213
|
+
resistance: 200
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Decision Matrix: Which Easing When?
|
|
221
|
+
|
|
222
|
+
| Scenario | CSS | GSAP | Framer Motion |
|
|
223
|
+
|---|---|---|---|
|
|
224
|
+
| Hover/focus state | `ease-out` or `cubic-bezier(0.2,0,0,1)` | `power2.out` | `type: "tween", ease: "easeOut"` |
|
|
225
|
+
| Modal entry | `cubic-bezier(0.16, 1, 0.3, 1)` | `power3.out` or `back.out(1.4)` | `type: "spring", stiffness: 300, damping: 25` |
|
|
226
|
+
| Modal exit | `ease-in` or `cubic-bezier(0.4, 0, 1, 1)` | `power2.in` | `type: "tween", ease: "easeIn", duration: 0.15` |
|
|
227
|
+
| List stagger | `ease-out` | `power2.out` with `stagger: 0.05` | Spring + `staggerChildren: 0.05` |
|
|
228
|
+
| Scroll-driven | `linear` | `none` | N/A (use `useScroll`) |
|
|
229
|
+
| Page transition | `cubic-bezier(0.4, 0, 0.2, 1)` | `power2.inOut` | `type: "tween", ease: "easeInOut"` |
|
|
230
|
+
| Bounce / playful | `linear(...)` bounce curve | `bounce.out` or `elastic.out` | `type: "spring", stiffness: 600, damping: 15` |
|
|
231
|
+
| Drag release | N/A | `power3.out` | `type: "spring", stiffness: 400, damping: 30` |
|