Skip to content

Commit 3d24750

Browse files
tombigelydanivcursoragent
authored
Tombigel/llm preset rules (#78)
* Add LLM rules for motion presets (pilot batch) Generate structured rule files to help LLMs understand and recommend motion presets. Includes 15 pilot files across all 5 categories for format validation: - entrance: FadeIn, ArcIn, BounceIn - scroll: ParallaxScroll, FadeScroll, ArcScroll - ongoing: Pulse, Bounce, Spin - mouse: Tilt3DMouse, TrackMouse, BounceMouse - background-scroll: BgParallax, BgZoom, BgFade Each rule contains: synonyms, visual description, when to use/not use, TypeScript parameters with constraints, minimal examples, and related presets. * Refine visual descriptions and usage guidelines for motion presets - Updated visual descriptions to use plain language, focusing on user experience rather than technical details. - Streamlined "When to Use" and "When NOT to Use" sections for clarity and brevity. - Enhanced examples to demonstrate meaningful differences in behavior. - Removed unnecessary technical jargon and emphasized user-centric language across multiple preset files. * Update PLAN.md for motion presets: fix lint issues * Restructure LLM preset rules with two-level hierarchy - Add 5 category files (entrance.md, scroll.md, ongoing.md, mouse.md, background-scroll.md) with decision guides - Each preset now has tags and synonyms for better LLM intent matching - Simplified preset files to focus on visual description, parameters, examples - Added accessibility considerations section to category files - Added time units (ms) to all duration/delay parameters - Updated PLAN.md with new structure and guidelines * Run prettier --fix on packages/motion-presets/rules * Refactor motion presets documentation for consistency and clarity - Updated descriptions, tags, and synonyms across multiple preset files to ensure uniform formatting. - Enhanced readability by standardizing bullet points and spacing. - Improved accessibility considerations and decision guides in category files for better user guidance. * Add power-controlled params documentation and update PLAN.md as source of truth - Add power-controlled params notes to all presets (Entrance, Scroll, Ongoing, Mouse) - Update PLAN.md with complete power mappings for regeneration - Consolidate documentation structure with presets-reference.md * Document background scroll DOM structure requirements - Clarify that background scroll requires data-motion-part attributes - Note that these animate DOM elements via transforms, not CSS background-position - Add ImageParallax exception for regular img elements * fix md lint * fixed lint issues - ran 'yarn format' on all md files * made better a11y rules * Update motion presets documentation based on the real presets implemen tation plan - Refactor section headings for better readability across all preset files. - Standardize usage notes for when to use and not use each animation type. - Consolidate available presets information and enhance quick decision tables. - Update PLAN.md to reflect the current status and versioning of presets. * Apply suggestion from @ydaniv Co-authored-by: Yehonatan Daniv <maggotfish@gmail.com> * Address PR review feedback on PLAN.md - Rewrite trigger mechanisms as preset categories (not triggers) - Remove background scroll section (not functional yet) - Remove Status column and deleted presets from registry tables - Clarify animation options vs preset parameters (duration/delay are config-level) - Fix intensity values to match actual code powermaps (ArcIn, SpinIn, TiltScroll, ongoing presets) - Remove power reference from intensity guide heading - Add conditions note for reduced motion in accessibility section - Rewrite combining animations as general rules about CSS property conflicts - Remove migration reference and merge data sources into regeneration steps - Clean up Bg* preset references, fix desktop-only claim for mouse presets - Trim parameter naming conventions to overloaded names only (direction) - Remove --motion-opacity (unused), update distance units documentation Co-authored-by: Cursor <cursoragent@cursor.com> * Regenerate preset docs: GrowIn→ExpandIn, add registry alignment step - Rename GrowIn to ExpandIn across all preset docs (aligned with src/library) - Remove duplicate ExpandIn section in presets-reference.md - Remove deleted background-scroll.md - Add registry verification as first regeneration step in PLAN.md - Regenerate all category docs from updated PLAN.md Co-authored-by: Cursor <cursoragent@cursor.com> * refactored rules to the structure of skills for future coimpatibility. editd some of the descriptions to be more accurate * regeneratwd all files from scratch * moved presets plan to .cursor/plans * fixed lint * update preset rules: designer descriptions, atmosphere selection, code fixes - Add designer-approved descriptions as single source of truth in plan - Replace tone selection table with 8 atmosphere groups (designer content) - Replace use-case table with placement recommendations - Fix discrepancies from source: GlideIn angle, ArcScroll perspective, direction table - Expand cross-category parallels and overloaded direction table - Exclude CustomMouse, SpinMouse, BounceMouse from generated rules - Fix intensity values: ArcIn easing, FlipIn initialRotate - Regenerate all 5 files from cleaned plan Made-with: Cursor * Fixed format --------- Co-authored-by: Yehonatan Daniv <maggotfish@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 0e778d7 commit 3d24750

6 files changed

Lines changed: 2322 additions & 0 deletions

File tree

.cursor/plans/motion_presets_llm_rules.plan.md

Lines changed: 729 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 365 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,365 @@
1+
---
2+
name: entrance-presets
3+
description: Full parameter reference for entrance motion presets. Read when configuring FadeIn, ArcIn, BlurIn, BounceIn, CurveIn, DropIn, ExpandIn, FlipIn, FloatIn, FoldIn, GlideIn, RevealIn, ShapeIn, ShuttersIn, SlideIn, SpinIn, TiltIn, TurnIn, or WinkIn entrance animations.
4+
---
5+
6+
# Entrance Presets
7+
8+
Entrance presets animate an element's first appearance, typically triggered when it enters the viewport. They can also be triggered by hover, click, or other events.
9+
10+
## Table of Contents
11+
12+
- [FadeIn](#fadein)
13+
- [ArcIn](#arcin)
14+
- [BlurIn](#blurin)
15+
- [BounceIn](#bouncein)
16+
- [CurveIn](#curvein)
17+
- [DropIn](#dropin)
18+
- [ExpandIn](#expandin)
19+
- [FlipIn](#flipin)
20+
- [FloatIn](#floatin)
21+
- [FoldIn](#foldin)
22+
- [GlideIn](#glidein)
23+
- [RevealIn](#revealin)
24+
- [ShapeIn](#shapein)
25+
- [ShuttersIn](#shuttersin)
26+
- [SlideIn](#slidein)
27+
- [SpinIn](#spinin)
28+
- [TiltIn](#tiltin)
29+
- [TurnIn](#turnin)
30+
- [WinkIn](#winkin)
31+
- [Optional Parameters](#optional-parameters)
32+
- [Intensity Value Guide](#intensity-value-guide)
33+
34+
---
35+
36+
### FadeIn
37+
38+
Visual: Element fades in smoothly from fully transparent to fully opaque.
39+
40+
Parameters: None — this preset has no configurable parameters.
41+
42+
```typescript
43+
{
44+
type: 'FadeIn';
45+
}
46+
```
47+
48+
---
49+
50+
### ArcIn
51+
52+
Visual: Element enters along a 3D arc path, rotating into view with depth motion.
53+
54+
Parameters:
55+
56+
- `direction`: 'top' | 'right' | 'bottom' | 'left' (default: `'right'`)
57+
- `depth`: UnitLengthPercentage — Z translation distance (default: `{ value: 200, unit: 'px' }`)
58+
- `perspective`: number — 3D perspective in px (default: `800`)
59+
60+
```typescript
61+
{ type: 'ArcIn', direction: 'bottom' }
62+
```
63+
64+
---
65+
66+
### BlurIn
67+
68+
Visual: Element transitions from blurred to sharp while fading in.
69+
70+
Parameters:
71+
72+
- `blur`: number — initial blur amount in px (default: `6`)
73+
74+
```typescript
75+
{ type: 'BlurIn', blur: 25 }
76+
```
77+
78+
---
79+
80+
### BounceIn
81+
82+
Visual: Element bounces into place from a direction with an elastic multi-step curve.
83+
84+
Parameters:
85+
86+
- `direction`: 'top' | 'right' | 'bottom' | 'left' | 'center' (default: `'bottom'`)
87+
- `distanceFactor`: number — bounce distance multiplier (default: `1`)
88+
- `perspective`: number — 3D perspective for center direction (default: `800`)
89+
90+
```typescript
91+
{ type: 'BounceIn', direction: 'left', distanceFactor: 2 }
92+
```
93+
94+
---
95+
96+
### CurveIn
97+
98+
Visual: Element curves in with a 180° rotation and depth motion in a 3D space, creating a swinging arc entrance.
99+
100+
Parameters:
101+
102+
- `direction`: 'left' | 'right' | 'pseudoLeft' | 'pseudoRight' (default: `'right'`)
103+
- `depth`: UnitLengthPercentage — Z translation distance (default: `{ value: 300, unit: 'px' }`)
104+
- `perspective`: number — 3D perspective in px (default: `200`)
105+
106+
```typescript
107+
{ type: 'CurveIn', direction: 'left' }
108+
```
109+
110+
---
111+
112+
### DropIn
113+
114+
Visual: Element shrinks down from a larger size to its final scale.
115+
116+
Parameters:
117+
118+
- `initialScale`: number — starting scale before settling to 1 (default: `1.6`)
119+
120+
```typescript
121+
{ type: 'DropIn', initialScale: 2 }
122+
```
123+
124+
---
125+
126+
### ExpandIn
127+
128+
Visual: Element expands from a point in a given direction, scaling from small to full size with a fade-in.
129+
130+
Parameters:
131+
132+
- `initialScale`: number — starting scale, 0 = invisible (default: `0`)
133+
- `direction`: number | 'top' | 'right' | 'bottom' | 'left' — angle or cardinal direction (default: `90` / top). 0° = right, 90° = top, 180° = left, 270° = bottom
134+
- `distance`: UnitLengthPercentage — how far the element travels (default: `{ value: 120, unit: 'percentage' }`)
135+
136+
```typescript
137+
{ type: 'ExpandIn', direction: 'bottom', initialScale: 0.5 }
138+
```
139+
140+
---
141+
142+
### FlipIn
143+
144+
Visual: Element flips into view with a 3D rotation around the X or Y axis.
145+
146+
Parameters:
147+
148+
- `direction`: 'top' | 'right' | 'bottom' | 'left' (default: `'top'`)
149+
- `initialRotate`: number — starting rotation in degrees (default: `90`)
150+
- `perspective`: number — 3D perspective in px (default: `800`)
151+
152+
```typescript
153+
{ type: 'FlipIn', direction: 'right', initialRotate: 180 }
154+
```
155+
156+
---
157+
158+
### FloatIn
159+
160+
Visual: Element drifts gently into place from a direction with a fade-in.
161+
162+
Parameters:
163+
164+
- `direction`: 'top' | 'right' | 'bottom' | 'left' (default: `'left'`)
165+
166+
```typescript
167+
{ type: 'FloatIn', direction: 'bottom' }
168+
```
169+
170+
---
171+
172+
### FoldIn
173+
174+
Visual: Element unfolds from an edge, rotating around an axis at the edge as if hinged.
175+
176+
Parameters:
177+
178+
- `direction`: 'top' | 'right' | 'bottom' | 'left' (default: `'top'`)
179+
- `initialRotate`: number — starting fold angle in degrees (default: `90`)
180+
- `perspective`: number — 3D perspective in px (default: `800`)
181+
182+
```typescript
183+
{ type: 'FoldIn', direction: 'left', initialRotate: 60 }
184+
```
185+
186+
---
187+
188+
### GlideIn
189+
190+
Visual: Element glides in smoothly from off-screen along a direction.
191+
192+
Parameters:
193+
194+
- `direction`: number | 'top' | 'right' | 'bottom' | 'left' — angle or cardinal (default: `180` / left). 0° = right, 90° = top, 180° = left, 270° = bottom
195+
- `distance`: UnitLengthPercentage | 'top' | 'right' | 'bottom' | 'left' — travel distance or edge keyword (default: `{ value: 100, unit: 'percentage' }`)
196+
197+
```typescript
198+
{ type: 'GlideIn', direction: 270, distance: { value: 200, type: 'px' } }
199+
```
200+
201+
---
202+
203+
### RevealIn
204+
205+
Visual: Element is progressively revealed by an expanding clip-path from one edge.
206+
207+
Parameters:
208+
209+
- `direction`: 'top' | 'right' | 'bottom' | 'left' (default: `'left'`)
210+
211+
```typescript
212+
{ type: 'RevealIn', direction: 'bottom' }
213+
```
214+
215+
---
216+
217+
### ShapeIn
218+
219+
Visual: Element appears through an expanding geometric clip-path shape.
220+
221+
Parameters:
222+
223+
- `shape`: 'circle' | 'ellipse' | 'rectangle' | 'diamond' | 'window' (default: `'rectangle'`)
224+
225+
```typescript
226+
{ type: 'ShapeIn', shape: 'circle' }
227+
```
228+
229+
---
230+
231+
### ShuttersIn
232+
233+
Visual: Element is revealed through multiple shutter-like strips that open in sequence.
234+
235+
Parameters:
236+
237+
- `direction`: 'top' | 'right' | 'bottom' | 'left' (default: `'right'`)
238+
- `shutters`: number — number of shutter segments (default: `12`)
239+
- `staggered`: boolean — whether shutters open in a staggered pattern (default: `true`)
240+
241+
```typescript
242+
{ type: 'ShuttersIn', direction: 'top', shutters: 8 }
243+
```
244+
245+
---
246+
247+
### SlideIn
248+
249+
Visual: Element slides in from one side while being revealed with a clip-path mask.
250+
251+
Parameters:
252+
253+
- `direction`: 'top' | 'right' | 'bottom' | 'left' (default: `'left'`)
254+
- `initialTranslate`: number — 0 to 1, how far off-screen the element starts (default: `1`)
255+
256+
```typescript
257+
{ type: 'SlideIn', direction: 'right', initialTranslate: 0.5 }
258+
```
259+
260+
---
261+
262+
### SpinIn
263+
264+
Visual: Element spins into view while scaling from small to full size.
265+
266+
Parameters:
267+
268+
- `spins`: number — number of full rotations (default: `0.5`)
269+
- `direction`: 'clockwise' | 'counter-clockwise' (default: `'clockwise'`)
270+
- `initialScale`: number — starting scale, 0 = invisible (default: `0`)
271+
272+
```typescript
273+
{ type: 'SpinIn', spins: 1, direction: 'counter-clockwise' }
274+
```
275+
276+
---
277+
278+
### TiltIn
279+
280+
Visual: Element tilts in from the side with 3D rotation and a clip-path reveal.
281+
282+
Parameters:
283+
284+
- `direction`: 'left' | 'right' (default: `'left'`)
285+
- `depth`: UnitLengthPercentage — Z translation distance (default: `{ value: 200, unit: 'px' }`)
286+
- `perspective`: number — 3D perspective in px (default: `800`)
287+
288+
```typescript
289+
{ type: 'TiltIn', direction: 'right' }
290+
```
291+
292+
---
293+
294+
### TurnIn
295+
296+
Visual: Element rotates into view around a corner pivot point.
297+
298+
Parameters:
299+
300+
- `direction`: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' (default: `'top-left'`)
301+
302+
```typescript
303+
{ type: 'TurnIn', direction: 'bottom-right' }
304+
```
305+
306+
---
307+
308+
### WinkIn
309+
310+
Visual: Element winks into view by expanding from its horizontal or vertical center, while being revealed with a clip-path.
311+
312+
Parameters:
313+
314+
- `direction`: 'horizontal' | 'vertical' (default: `'horizontal'`)
315+
316+
```typescript
317+
{ type: 'WinkIn', direction: 'vertical' }
318+
```
319+
320+
---
321+
322+
## Optional Parameters
323+
324+
Some preset parameters are exposed but their defaults have been tuned for good visual results and rarely need adjustment.
325+
326+
### 3D Perspective
327+
328+
| Preset | Parameter | Default | Range |
329+
| ----------------- | ------------- | ------- | -------- |
330+
| ArcIn | `perspective` | 800 | 200-2000 |
331+
| TiltIn | `perspective` | 800 | 200-2000 |
332+
| FoldIn | `perspective` | 800 | 200-2000 |
333+
| FlipIn | `perspective` | 800 | 200-2000 |
334+
| CurveIn | `perspective` | 200 | 100-1000 |
335+
| BounceIn (center) | `perspective` | 800 | 200-2000 |
336+
337+
### Depth (Z Translation)
338+
339+
| Preset | Parameter | Default | Notes |
340+
| ------- | --------- | ------- | ---------------------- |
341+
| ArcIn | `depth` | 200px | Z translation distance |
342+
| CurveIn | `depth` | 300px | Z translation distance |
343+
| TiltIn | `depth` | 200px | Z translation distance |
344+
345+
## Intensity Value Guide
346+
347+
Tested values for different intensity levels. When a user asks for "soft", "subtle", "medium", or "hard"/"dramatic" motion, use these as guidelines.
348+
349+
| Preset | Parameter | Subtle/Soft | Medium | Dramatic/Hard |
350+
| -------- | ---------------- | ----------- | ---------- | ------------- |
351+
| ArcIn | easing | sineOut | cubicInOut | quintInOut |
352+
| BlurIn | blur | 6px | 25px | 50px |
353+
| BounceIn | distanceFactor | 1 | 2 | 3 |
354+
| DropIn | initialScale | 1.2 | 1.6 | 2 |
355+
| FlipIn | initialRotate | 35° | 60° | 90° |
356+
| FoldIn | initialRotate | 35° | 60° | 90° |
357+
| ExpandIn | initialScale | 0.8 | 0.6 | 0 |
358+
| SlideIn | initialTranslate | 0.2 | 0.8 | 1 |
359+
| SpinIn | initialScale | 1 | 0.6 | 0 |
360+
361+
### Intensity Usage Example
362+
363+
When a user asks: "I want a subtle flip entrance"
364+
365+
Suggest: `{ type: 'FlipIn', initialRotate: 35 }`

0 commit comments

Comments
 (0)