motion-ui-skill 2.0.0 → 2.1.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 +71 -21
- package/SKILL.md +83 -9
- package/bin/index.mjs +2 -2
- package/bin/installer.mjs +6 -0
- package/catalog.json +1044 -139
- package/components/agents/thinking-states.tsx +156 -0
- package/components/buttons/aqua-button.tsx +145 -0
- package/components/buttons/ash-burst-button.tsx +528 -0
- package/components/buttons/brutal-button.tsx +68 -0
- package/components/buttons/chrome-button.tsx +444 -0
- package/components/buttons/click-powerup.tsx +203 -0
- package/components/buttons/command-button.tsx +226 -0
- package/components/buttons/confetti-button.tsx +132 -0
- package/components/buttons/cooldown-button.tsx +169 -0
- package/components/buttons/demonic-button.tsx +470 -0
- package/components/buttons/dither-button.tsx +192 -0
- package/components/buttons/doubt-button.tsx +240 -0
- package/components/buttons/evil-eye-button.tsx +563 -0
- package/components/buttons/frame-button.tsx +211 -0
- package/components/buttons/glitch-button.tsx +243 -0
- package/components/buttons/highlight-button.tsx +196 -0
- package/components/buttons/hold-button.tsx +245 -0
- package/components/buttons/minecraft-button.tsx +651 -0
- package/components/buttons/minimal-button.tsx +50 -0
- package/components/buttons/morph-status-button.tsx +264 -0
- package/components/buttons/movie-pass-button.tsx +205 -0
- package/components/buttons/realistic-switch.tsx +298 -0
- package/components/buttons/reveal-button.tsx +197 -0
- package/components/buttons/shiny-button.tsx +87 -0
- package/components/buttons/slide-to-detonate.tsx +444 -0
- package/components/buttons/sticky-button.tsx +184 -0
- package/components/buttons/thruster-button.tsx +920 -0
- package/components/buttons/troll-button.tsx +264 -0
- package/components/motion/banner-stacking.tsx +124 -0
- package/components/motion/delete-with-smoky-dissolve.tsx +145 -0
- package/components/motion/donut-chart.tsx +112 -0
- package/components/motion/drag-drop-with-physics.tsx +116 -0
- package/components/motion/dropdown-menu-morph.tsx +157 -0
- package/components/motion/get-pro-button.tsx +54 -0
- package/components/motion/image-open-tilt.tsx +79 -0
- package/components/motion/input-clear-with-dissolve.tsx +111 -0
- package/components/motion/learn-more-hover.tsx +71 -0
- package/components/motion/matrix-dot-loader.tsx +68 -0
- package/components/motion/organic-shimmer.tsx +49 -0
- package/components/motion/pro-gradient-text.tsx +46 -0
- package/components/motion/skeleton-loader-and-reveal.tsx +81 -0
- package/components/motion/spinner-to-check-morph.tsx +99 -0
- package/components/motion/spinning-counter.tsx +64 -0
- package/components/motion/text-morph.tsx +80 -0
- package/components/motion/texts-reveal.tsx +49 -0
- package/data/app-interface.csv +33 -0
- package/data/charts.csv +26 -0
- package/data/colors.csv +193 -0
- package/data/google-fonts.csv +1935 -0
- package/data/icons.csv +106 -0
- package/data/landing.csv +35 -0
- package/data/motion.csv +18 -0
- package/data/products.csv +193 -0
- package/data/react-performance.csv +45 -0
- package/data/stacks/angular.csv +51 -0
- package/data/stacks/astro.csv +54 -0
- package/data/stacks/avalonia.csv +57 -0
- package/data/stacks/flutter.csv +53 -0
- package/data/stacks/html-tailwind.csv +60 -0
- package/data/stacks/javafx.csv +76 -0
- package/data/stacks/jetpack-compose.csv +53 -0
- package/data/stacks/laravel.csv +51 -0
- package/data/stacks/nextjs.csv +62 -0
- package/data/stacks/nuxt-ui.csv +77 -0
- package/data/stacks/nuxtjs.csv +68 -0
- package/data/stacks/react-native.csv +52 -0
- package/data/stacks/react.csv +67 -0
- package/data/stacks/shadcn.csv +69 -0
- package/data/stacks/svelte.csv +56 -0
- package/data/stacks/swiftui.csv +51 -0
- package/data/stacks/threejs.csv +54 -0
- package/data/stacks/uno.csv +60 -0
- package/data/stacks/uwp.csv +56 -0
- package/data/stacks/vue.csv +50 -0
- package/data/stacks/winui.csv +60 -0
- package/data/stacks/wpf.csv +57 -0
- package/data/styles.csv +89 -0
- package/data/typography.csv +75 -0
- package/data/ui-reasoning.csv +193 -0
- package/data/ux-guidelines.csv +120 -0
- package/evals/catalog_eval.py +56 -0
- package/icons/annotations/loop-arrow.tsx +61 -0
- package/icons/brands/anthropic.tsx +26 -0
- package/icons/brands/apple.tsx +26 -0
- package/icons/brands/canva.tsx +26 -0
- package/icons/brands/claude-ai.tsx +26 -0
- package/icons/brands/discord.tsx +26 -0
- package/icons/brands/github.tsx +26 -0
- package/icons/brands/gmail.tsx +26 -0
- package/icons/brands/google.tsx +26 -0
- package/icons/brands/linkedin.tsx +29 -0
- package/icons/brands/microsoft.tsx +26 -0
- package/icons/brands/next-js.tsx +26 -0
- package/icons/brands/producthunt.tsx +26 -0
- package/icons/brands/react-js.tsx +29 -0
- package/icons/brands/shadcn-ui.tsx +26 -0
- package/icons/brands/tailwind-css.tsx +26 -0
- package/icons/brands/twitter.tsx +30 -0
- package/icons/brands/typescript.tsx +26 -0
- package/icons/brands/unsplash.tsx +27 -0
- package/icons/brands/vercel.tsx +26 -0
- package/icons/brands/whatsapp.tsx +26 -0
- package/package.json +9 -3
- package/prompts/install-motion-ui.md +17 -0
- package/references/agents/thinking-states.md +56 -0
- package/references/craft/aqua-button.md +53 -0
- package/references/craft/ash-burst-button.md +55 -0
- package/references/craft/brutal-button.md +52 -0
- package/references/craft/chrome-button.md +53 -0
- package/references/craft/click-powerup.md +53 -0
- package/references/craft/command-button.md +53 -0
- package/references/craft/confetti-button.md +54 -0
- package/references/craft/cooldown-button.md +54 -0
- package/references/craft/demonic-button.md +53 -0
- package/references/craft/dither-button.md +52 -0
- package/references/craft/doubt-button.md +53 -0
- package/references/craft/evil-eye-button.md +52 -0
- package/references/craft/frame-button.md +54 -0
- package/references/craft/glitch-button.md +52 -0
- package/references/craft/highlight-button.md +53 -0
- package/references/craft/hold-button.md +53 -0
- package/references/craft/minecraft-button.md +53 -0
- package/references/craft/minimal-button.md +52 -0
- package/references/craft/morph-status-button.md +53 -0
- package/references/craft/movie-pass-button.md +53 -0
- package/references/craft/realistic-switch.md +54 -0
- package/references/craft/reveal-button.md +53 -0
- package/references/craft/shiny-button.md +52 -0
- package/references/craft/slide-to-detonate.md +53 -0
- package/references/craft/sticky-button.md +54 -0
- package/references/craft/thruster-button.md +53 -0
- package/references/craft/troll-button.md +54 -0
- package/references/guides/design-intelligence.md +125 -0
- package/references/guides/interaction-transitions.md +56 -38
- package/references/guides/motion-polish-rules.md +75 -0
- package/references/guides/stack-best-practices.md +38 -0
- package/references/motion/banner-stacking.md +67 -0
- package/references/motion/delete-with-smoky-dissolve.md +60 -0
- package/references/motion/donut-chart.md +79 -0
- package/references/motion/drag-drop-with-physics.md +61 -0
- package/references/motion/dropdown-menu-morph.md +55 -0
- package/references/motion/get-pro-button.md +56 -0
- package/references/motion/image-open-tilt.md +60 -0
- package/references/motion/input-clear-with-dissolve.md +58 -0
- package/references/motion/learn-more-hover.md +56 -0
- package/references/motion/matrix-dot-loader.md +58 -0
- package/references/motion/organic-shimmer.md +63 -0
- package/references/motion/pro-gradient-text.md +57 -0
- package/references/motion/skeleton-loader-and-reveal.md +67 -0
- package/references/motion/spinner-to-check-morph.md +67 -0
- package/references/motion/spinning-counter.md +74 -0
- package/references/motion/text-morph.md +64 -0
- package/references/motion/texts-reveal.md +56 -0
- package/scripts/build_docs.py +39 -4
- package/scripts/core.py +993 -0
- package/scripts/design_system.py +1668 -0
- package/scripts/reasoning_contract.py +123 -0
- package/scripts/search.py +177 -0
- package/scripts/test_release.py +12 -0
- package/scripts/verify_skill.py +4 -4
- package/test/test_installer.mjs +133 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Realistic Switch"
|
|
3
|
+
description: "Latching physical push switch that sinks into a recessed socket, stays down with an internal glow, and pops up."
|
|
4
|
+
category: "Components"
|
|
5
|
+
publishedAt: "2026-10-21"
|
|
6
|
+
updatedAt: "2026-10-21"
|
|
7
|
+
documentation: "references/craft/realistic-switch.md"
|
|
8
|
+
markdown: "references/craft/realistic-switch.md"
|
|
9
|
+
license: "MIT"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Realistic Switch
|
|
13
|
+
|
|
14
|
+
> Latching physical push switch that sinks into a recessed socket, stays down with an internal glow, and pops up.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Install via motion-ui skill CLI:
|
|
20
|
+
python scripts/install-component.py realistic-switch --dest ./src
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Dependencies
|
|
24
|
+
|
|
25
|
+
- `clsx`
|
|
26
|
+
- `motion`
|
|
27
|
+
- `react`
|
|
28
|
+
- `tailwind-merge`
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
"use client";
|
|
34
|
+
|
|
35
|
+
import { RealisticSwitch } from "@/components/buttons/realistic-switch";
|
|
36
|
+
|
|
37
|
+
export function RealisticSwitchDemo() {
|
|
38
|
+
return (
|
|
39
|
+
<div className="flex items-center justify-center p-6">
|
|
40
|
+
<RealisticSwitch>Click Me</RealisticSwitch>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## API Reference
|
|
47
|
+
|
|
48
|
+
### RealisticSwitch
|
|
49
|
+
|
|
50
|
+
| Prop | Type | Default | Required | Description |
|
|
51
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
52
|
+
| `checked` | `boolean` | false | No | Controlled switch state |
|
|
53
|
+
| `onCheckedChange` | `(checked: boolean) => void` | — | No | State change handler |
|
|
54
|
+
| `className` | `string` | — | No | Additional CSS classes |
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reveal Button"
|
|
3
|
+
description: "Button that conceals and reveals a sensitive secret value on hold or toggle with blur-in transitions."
|
|
4
|
+
category: "Components"
|
|
5
|
+
publishedAt: "2026-10-21"
|
|
6
|
+
updatedAt: "2026-10-21"
|
|
7
|
+
documentation: "references/craft/reveal-button.md"
|
|
8
|
+
markdown: "references/craft/reveal-button.md"
|
|
9
|
+
license: "MIT"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Reveal Button
|
|
13
|
+
|
|
14
|
+
> Button that conceals and reveals a sensitive secret value on hold or toggle with blur-in transitions.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Install via motion-ui skill CLI:
|
|
20
|
+
python scripts/install-component.py reveal-button --dest ./src
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Dependencies
|
|
24
|
+
|
|
25
|
+
- `clsx`
|
|
26
|
+
- `motion`
|
|
27
|
+
- `react`
|
|
28
|
+
- `tailwind-merge`
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
"use client";
|
|
34
|
+
|
|
35
|
+
import { RevealButton } from "@/components/buttons/reveal-button";
|
|
36
|
+
|
|
37
|
+
export function RevealButtonDemo() {
|
|
38
|
+
return (
|
|
39
|
+
<div className="flex items-center justify-center p-6">
|
|
40
|
+
<RevealButton>Click Me</RevealButton>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## API Reference
|
|
47
|
+
|
|
48
|
+
### RevealButton
|
|
49
|
+
|
|
50
|
+
| Prop | Type | Default | Required | Description |
|
|
51
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
52
|
+
| `secret` | `string` | — | Yes | Confidential text string revealed on interaction |
|
|
53
|
+
| `className` | `string` | — | No | Additional CSS classes |
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Shiny Button"
|
|
3
|
+
description: "Glossy button with high-contrast inner glow layers and a specular glint that sweeps across on every click."
|
|
4
|
+
category: "Components"
|
|
5
|
+
publishedAt: "2026-10-21"
|
|
6
|
+
updatedAt: "2026-10-21"
|
|
7
|
+
documentation: "references/craft/shiny-button.md"
|
|
8
|
+
markdown: "references/craft/shiny-button.md"
|
|
9
|
+
license: "MIT"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Shiny Button
|
|
13
|
+
|
|
14
|
+
> Glossy button with high-contrast inner glow layers and a specular glint that sweeps across on every click.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Install via motion-ui skill CLI:
|
|
20
|
+
python scripts/install-component.py shiny-button --dest ./src
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Dependencies
|
|
24
|
+
|
|
25
|
+
- `clsx`
|
|
26
|
+
- `react`
|
|
27
|
+
- `tailwind-merge`
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
"use client";
|
|
33
|
+
|
|
34
|
+
import { ShinyButton } from "@/components/buttons/shiny-button";
|
|
35
|
+
|
|
36
|
+
export function ShinyButtonDemo() {
|
|
37
|
+
return (
|
|
38
|
+
<div className="flex items-center justify-center p-6">
|
|
39
|
+
<ShinyButton>Click Me</ShinyButton>
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## API Reference
|
|
46
|
+
|
|
47
|
+
### ShinyButton
|
|
48
|
+
|
|
49
|
+
| Prop | Type | Default | Required | Description |
|
|
50
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
51
|
+
| `className` | `string` | — | No | Additional CSS classes |
|
|
52
|
+
| `children` | `React.ReactNode` | — | No | Button label content |
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Slide to Detonate"
|
|
3
|
+
description: "Slide-to-confirm safety trigger that requires dragging a lock handle across a burning fuse to detonate."
|
|
4
|
+
category: "Components"
|
|
5
|
+
publishedAt: "2026-10-21"
|
|
6
|
+
updatedAt: "2026-10-21"
|
|
7
|
+
documentation: "references/craft/slide-to-detonate.md"
|
|
8
|
+
markdown: "references/craft/slide-to-detonate.md"
|
|
9
|
+
license: "MIT"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Slide to Detonate
|
|
13
|
+
|
|
14
|
+
> Slide-to-confirm safety trigger that requires dragging a lock handle across a burning fuse to detonate.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Install via motion-ui skill CLI:
|
|
20
|
+
python scripts/install-component.py slide-to-detonate --dest ./src
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Dependencies
|
|
24
|
+
|
|
25
|
+
- `clsx`
|
|
26
|
+
- `motion`
|
|
27
|
+
- `react`
|
|
28
|
+
- `tailwind-merge`
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
"use client";
|
|
34
|
+
|
|
35
|
+
import { SlideToDetonate } from "@/components/buttons/slide-to-detonate";
|
|
36
|
+
|
|
37
|
+
export function SlideToDetonateDemo() {
|
|
38
|
+
return (
|
|
39
|
+
<div className="flex items-center justify-center p-6">
|
|
40
|
+
<SlideToDetonate>Click Me</SlideToDetonate>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## API Reference
|
|
47
|
+
|
|
48
|
+
### SlideToDetonate
|
|
49
|
+
|
|
50
|
+
| Prop | Type | Default | Required | Description |
|
|
51
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
52
|
+
| `onDetonate` | `() => void` | — | No | Callback invoked when slider reaches detonation threshold |
|
|
53
|
+
| `className` | `string` | — | No | Additional CSS classes |
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Sticky Button"
|
|
3
|
+
description: "Magnetic cursor button pulled toward the pointer from a wide capture field with parallax tilt and depth."
|
|
4
|
+
category: "Components"
|
|
5
|
+
publishedAt: "2026-10-21"
|
|
6
|
+
updatedAt: "2026-10-21"
|
|
7
|
+
documentation: "references/craft/sticky-button.md"
|
|
8
|
+
markdown: "references/craft/sticky-button.md"
|
|
9
|
+
license: "MIT"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Sticky Button
|
|
13
|
+
|
|
14
|
+
> Magnetic cursor button pulled toward the pointer from a wide capture field with parallax tilt and depth.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Install via motion-ui skill CLI:
|
|
20
|
+
python scripts/install-component.py sticky-button --dest ./src
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Dependencies
|
|
24
|
+
|
|
25
|
+
- `clsx`
|
|
26
|
+
- `motion`
|
|
27
|
+
- `react`
|
|
28
|
+
- `tailwind-merge`
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
"use client";
|
|
34
|
+
|
|
35
|
+
import { StickyButton } from "@/components/buttons/sticky-button";
|
|
36
|
+
|
|
37
|
+
export function StickyButtonDemo() {
|
|
38
|
+
return (
|
|
39
|
+
<div className="flex items-center justify-center p-6">
|
|
40
|
+
<StickyButton>Click Me</StickyButton>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## API Reference
|
|
47
|
+
|
|
48
|
+
### StickyButton
|
|
49
|
+
|
|
50
|
+
| Prop | Type | Default | Required | Description |
|
|
51
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
52
|
+
| `pullRadius` | `number` | 150 | No | Cursor magnetic attraction radius in pixels |
|
|
53
|
+
| `className` | `string` | — | No | Additional CSS classes |
|
|
54
|
+
| `children` | `React.ReactNode` | — | No | Button label content |
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Thruster Button"
|
|
3
|
+
description: "Air-jet thruster button that lifts off container floor and flies toward cursor with particle vapor trails."
|
|
4
|
+
category: "Components"
|
|
5
|
+
publishedAt: "2026-10-21"
|
|
6
|
+
updatedAt: "2026-10-21"
|
|
7
|
+
documentation: "references/craft/thruster-button.md"
|
|
8
|
+
markdown: "references/craft/thruster-button.md"
|
|
9
|
+
license: "MIT"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Thruster Button
|
|
13
|
+
|
|
14
|
+
> Air-jet thruster button that lifts off container floor and flies toward cursor with particle vapor trails.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Install via motion-ui skill CLI:
|
|
20
|
+
python scripts/install-component.py thruster-button --dest ./src
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Dependencies
|
|
24
|
+
|
|
25
|
+
- `clsx`
|
|
26
|
+
- `motion`
|
|
27
|
+
- `react`
|
|
28
|
+
- `tailwind-merge`
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
"use client";
|
|
34
|
+
|
|
35
|
+
import { ThrusterButton } from "@/components/buttons/thruster-button";
|
|
36
|
+
|
|
37
|
+
export function ThrusterButtonDemo() {
|
|
38
|
+
return (
|
|
39
|
+
<div className="flex items-center justify-center p-6">
|
|
40
|
+
<ThrusterButton>Click Me</ThrusterButton>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## API Reference
|
|
47
|
+
|
|
48
|
+
### ThrusterButton
|
|
49
|
+
|
|
50
|
+
| Prop | Type | Default | Required | Description |
|
|
51
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
52
|
+
| `className` | `string` | — | No | Additional CSS classes |
|
|
53
|
+
| `children` | `React.ReactNode` | — | No | Button label content |
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Troll Button"
|
|
3
|
+
description: "Playful button that evasively dodges the cursor until exhausting stamina, finally surrendering to be clicked."
|
|
4
|
+
category: "Components"
|
|
5
|
+
publishedAt: "2026-10-21"
|
|
6
|
+
updatedAt: "2026-10-21"
|
|
7
|
+
documentation: "references/craft/troll-button.md"
|
|
8
|
+
markdown: "references/craft/troll-button.md"
|
|
9
|
+
license: "MIT"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Troll Button
|
|
13
|
+
|
|
14
|
+
> Playful button that evasively dodges the cursor until exhausting stamina, finally surrendering to be clicked.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Install via motion-ui skill CLI:
|
|
20
|
+
python scripts/install-component.py troll-button --dest ./src
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Dependencies
|
|
24
|
+
|
|
25
|
+
- `clsx`
|
|
26
|
+
- `motion`
|
|
27
|
+
- `react`
|
|
28
|
+
- `tailwind-merge`
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
"use client";
|
|
34
|
+
|
|
35
|
+
import { TrollButton } from "@/components/buttons/troll-button";
|
|
36
|
+
|
|
37
|
+
export function TrollButtonDemo() {
|
|
38
|
+
return (
|
|
39
|
+
<div className="flex items-center justify-center p-6">
|
|
40
|
+
<TrollButton>Click Me</TrollButton>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## API Reference
|
|
47
|
+
|
|
48
|
+
### TrollButton
|
|
49
|
+
|
|
50
|
+
| Prop | Type | Default | Required | Description |
|
|
51
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
52
|
+
| `stamina` | `number` | 5 | No | Number of evasion hops before surrendering |
|
|
53
|
+
| `className` | `string` | — | No | Additional CSS classes |
|
|
54
|
+
| `children` | `React.ReactNode` | — | No | Button label content |
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Design Intelligence & UI Reasoning Guide"
|
|
3
|
+
description: "Comprehensive design intelligence and reasoning guide covering 67 UI style families, industry-mapped color palettes, font pairings, chart selectors, and conversion rate optimization (CRO) architectures."
|
|
4
|
+
documentation: "references/guides/design-intelligence.md"
|
|
5
|
+
markdown: "references/guides/design-intelligence.md"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Design Intelligence & UI Reasoning Guide
|
|
9
|
+
|
|
10
|
+
> Integrated design intelligence and reasoning engine for AI agents and frontend engineers, synthesized from [ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill).
|
|
11
|
+
|
|
12
|
+
Modern AI agents often produce bland, generic interfaces because they lack domain-specific design reasoning. This guide provides structured decision trees, token palettes, typography pairings, landing page CRO patterns, and terminal search commands.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 1. Terminal Design Search Engine
|
|
17
|
+
|
|
18
|
+
Search across styles, color systems, typography, charts, UX patterns, and tech stacks directly from your terminal:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Search by style (e.g. glassmorphism, brutalism, minimal, retro, bento)
|
|
22
|
+
python scripts/search.py "glassmorphism" --domain style
|
|
23
|
+
|
|
24
|
+
# Search industry color palette (e.g. fintech, saas, healthcare, devtools)
|
|
25
|
+
python scripts/search.py "fintech" --domain color
|
|
26
|
+
|
|
27
|
+
# Search typography pairings (e.g. editorial, technical, playful, modern)
|
|
28
|
+
python scripts/search.py "editorial" --domain typography
|
|
29
|
+
|
|
30
|
+
# Search optimal chart type (e.g. time series, retention, distribution, comparison)
|
|
31
|
+
python scripts/search.py "retention" --domain chart
|
|
32
|
+
|
|
33
|
+
# Search UX best practices (e.g. modal, checkout, form, error)
|
|
34
|
+
python scripts/search.py "form" --domain ux
|
|
35
|
+
|
|
36
|
+
# Generate a complete cohesive design system for a product domain
|
|
37
|
+
python scripts/search.py "Crypto Trading Platform" --design-system
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 2. Priority Rules Matrix (1 to 10)
|
|
43
|
+
|
|
44
|
+
| Priority | Category | Impact | Domain | Key Checks (Must Have) | Anti-Patterns (Avoid) |
|
|
45
|
+
|:---|:---|:---|:---|:---|:---|
|
|
46
|
+
| **1** | **Accessibility** | CRITICAL | `ux` | 4.5:1 text contrast, Visible focus area (3:1 contrast), Alt text, Aria labels, Tab order | Removing focus outlines, Icon-only buttons without accessible text |
|
|
47
|
+
| **2** | **Touch & Interaction** | CRITICAL | `ux` | 44×44px touch targets (Apple HIG), 24×24px web min (WCAG 2.2), 8px+ touch spacing | Hover-only controls on mobile, 0ms instant jarring state snaps |
|
|
48
|
+
| **3** | **Performance & CLS** | HIGH | `ux` | Reserve layout footprint (CLS < 0.1), WebP/AVIF formats, Virtualize large lists | Layout thrashing, animating width/height in hot loops |
|
|
49
|
+
| **4** | **Style Selection** | HIGH | `style` | Align style family with product domain, consistent corner radii, SVG icons | Randomly mixing flat and skeuomorphic styles, emoji as icons |
|
|
50
|
+
| **5** | **Layout & Responsive** | HIGH | `ux` | Mobile-first breakpoints, fluid flex/grid layouts, no horizontal overflow | Horizontal scrolling, hardcoded fixed px container widths |
|
|
51
|
+
| **6** | **Typography & Color** | MEDIUM | `typography`, `color` | Base 16px body, 1.5 line height, semantic token abstraction | Body text < 12px, low-contrast gray-on-gray, raw hex strings |
|
|
52
|
+
| **7** | **Animation & Motion** | MEDIUM | `ux` | Context-aware spring timing, spatial continuity, prefers-reduced-motion | One static duration for all transitions, floaty un-damped springs |
|
|
53
|
+
| **8** | **Forms & Validation** | MEDIUM | `ux` | Persistent floating/visible labels, inline field validation, progressive disclosure | Placeholder-only labels, aggregate errors only at form top |
|
|
54
|
+
| **9** | **Navigation Patterns** | HIGH | `ux` | Predictable back stack, bottom navigation items ≤ 5, deep linking support | Overcrowded navigation bars, breaking browser back button |
|
|
55
|
+
| **10** | **Data Visualization** | LOW | `chart` | Explicit legends, hover tooltips, dual-encoding (color + shape/pattern) | Relying on color hue alone to differentiate chart segments |
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 3. The 67 UI Style Archetypes
|
|
60
|
+
|
|
61
|
+
| Category | Primary Styles | Visual Characteristics | Best Used For |
|
|
62
|
+
| :--- | :--- | :--- | :--- |
|
|
63
|
+
| **Translucent & Dimensional** | Glassmorphism, Frosted Glass, Aurora Glow, Liquid Metal | Backdrop blur (12-24px), 1px specular white borders, layered Z-depth, vivid background mesh | Modern SaaS, Web3, FinTech dashboards, floating overlays |
|
|
64
|
+
| **Flat & Crisp** | Minimal Clean, Origin, Shadcn-style, Swiss Modernism | Neutral monochromes, 1px hairline borders, high contrast ratios, strict grid rhythm | Enterprise software, developer tools, B2B productivity, documentation |
|
|
65
|
+
| **Tactile & Physical** | Neumorphism, Soft UI, Embossed, Claymorphism, Skeuomorphic 2.0 | Soft directional dual shadows (concave/convex), debossed wells, realistic switches | Smart home dashboards, audio interfaces, consumer mobile tools |
|
|
66
|
+
| **Bold & High-Contrast** | Neo-Brutalism, Retro-Futurism, Cyberpunk, Terminal Geek | 2px solid black borders, hard unblurred drop shadows (`shadow-[4px_4px_0px_#000]`), monospace accents | Dev tools, consumer web apps, creative portfolios, gaming |
|
|
67
|
+
| **Editorial & Curated** | Editorial Modern, Magazine, Museum Placard, Polaroid Gallery | Serif headlines (Playfair/Instrument), asymmetrical whitespace, delicate borders | Publishing, lifestyle brands, portfolio showcases, luxury commerce |
|
|
68
|
+
| **Structured Containers** | Bento Grid, Dashboard Metric Panels, Dock-Centric Surfaces | Discrete modular cells with independent border highlights and auto-scaling density | Product feature overviews, analytics centers, workspace consoles |
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 4. Industry Color Harmony Matrix
|
|
73
|
+
|
|
74
|
+
Every product domain demands a specific semantic color structure:
|
|
75
|
+
|
|
76
|
+
| Domain | Primary Accent | Background / Base | Card Surface | Psychological Signal |
|
|
77
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
78
|
+
| **FinTech & Crypto** | Amber / Gold (`#F59E0B`) | Navy Charcoal (`#0F172A`) | Deep Slate (`#1E293B`) | Wealth, stability, institutional security |
|
|
79
|
+
| **Developer Tools** | Indigo / Violet (`#6366F1`) | Deep Black (`#0A0A0A`) | Carbon Neutral (`#171717`) | Precision, speed, low cognitive friction |
|
|
80
|
+
| **Enterprise SaaS** | Deep Sky (`#0284C7`) | Crisp White (`#FFFFFF`) / Off-White (`#F8FAFC`) | Clean Surface (`#FFFFFF`) | Predictability, clarity, WCAG AAA compliance |
|
|
81
|
+
| **Health & Wellness** | Mint Emerald (`#10B981`) | Soft Sage / Off-White (`#F7FAF8`) | Clean White (`#FFFFFF`) | Vitality, reassurance, calm hygiene |
|
|
82
|
+
| **E-Commerce & Retail** | Rose / Coral (`#F43F5E`) | Warm White (`#FFFDFB`) | Soft Cream (`#FAFAF9`) | Urgency, delight, high purchase conversion |
|
|
83
|
+
| **Cyberpunk & Gaming** | Neon Cyan (`#06B6D4`) | Obsidian Void (`#030712`) | Dark Zinc (`#18181B`) | Immersive technology, futuristic energy |
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 5. Typography Pairing Blueprints
|
|
88
|
+
|
|
89
|
+
1. **Modern Minimal Technical**:
|
|
90
|
+
- Primary: `Geist` or `Inter` (500/600 for UI labels)
|
|
91
|
+
- Code/Numbers: `Geist Mono` or `JetBrains Mono` (tabular-nums for data tables)
|
|
92
|
+
- Hierarchy: H1 (32px/1.2), H2 (24px/1.3), Body (14px/1.5), Caption (12px/1.4)
|
|
93
|
+
2. **Editorial Premium**:
|
|
94
|
+
- Headlines: `Instrument Serif` or `Playfair Display` (400 italic accents)
|
|
95
|
+
- Body & Controls: `Inter` or `Plus Jakarta Sans` (400/500)
|
|
96
|
+
3. **Neo-Brutalist High Impact**:
|
|
97
|
+
- Headlines: `Space Grotesk` (700 bold, tracking-tight)
|
|
98
|
+
- Body & Badges: `Space Mono` (400/700)
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 6. Data Visualization Selection Decision Tree
|
|
103
|
+
|
|
104
|
+
When building dashboards, choose chart primitives based on data dimensionality:
|
|
105
|
+
|
|
106
|
+
- **Time Series Trends (1 Metric)**: Area chart with gradient fill and smooth cubic bezier spline (`recharts` / `tremor`).
|
|
107
|
+
- **Multi-Metric Comparison**: Grouped or stacked bar chart with accessible color contrast.
|
|
108
|
+
- **Part-to-Whole Composition**: Donut chart (`DonutChart`) with center KPI counter and segmented arc morphs.
|
|
109
|
+
- **Correlation & Distribution**: Scatter plot with hover tooltip crosshairs or heatmaps for density.
|
|
110
|
+
- **Funnel & Conversion Drop-off**: Horizontal step bar chart with delta indicators.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 7. High-Converting Landing Page Hierarchy
|
|
115
|
+
|
|
116
|
+
Every high-conversion product landing page follows an 8-part sequence:
|
|
117
|
+
|
|
118
|
+
1. **Hero Section**: Value proposition headline, subhead with concrete metric, dual CTAs (Primary action + Secondary demo), interactive component preview.
|
|
119
|
+
2. **Social Proof Strip**: Clean monochrome customer logos or quantitative social proof ("10,000+ engineers building daily").
|
|
120
|
+
3. **Core Feature Grid (Bento Layout)**: 3-5 modular cards showing animated micro-interactions of the real product.
|
|
121
|
+
4. **Interactive Playground / Deep-Dive**: Live widget that the user can click, drag, or toggle without signing up.
|
|
122
|
+
5. **Technical Comparison Table**: Crisp checkmark comparison matrix against legacy alternatives.
|
|
123
|
+
6. **Customer Testimonials & Case Studies**: Verified quotes with headshots, company badges, and measurable outcomes.
|
|
124
|
+
7. **Transparent Pricing Matrix**: Monthly/Annual toggle, feature tiers, "Most Popular" highlighted card, enterprise contact CTA.
|
|
125
|
+
8. **FAQ Accordion & Final CTA**: Interactive accordion addressing objections, followed by a bold final registration trigger.
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "The
|
|
3
|
-
description: "Reference catalog and implementation blueprints for
|
|
2
|
+
title: "The Canonical Interaction Transitions Guide"
|
|
3
|
+
description: "Reference catalog and implementation blueprints for all 43 UI interaction transitions from Transitions.dev, including cubic-bezier tokens, spring physics, and zero-layout-shift formulas."
|
|
4
4
|
documentation: "references/guides/interaction-transitions.md"
|
|
5
5
|
markdown: "references/guides/interaction-transitions.md"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# The
|
|
8
|
+
# The Canonical Interaction Transitions Guide
|
|
9
9
|
|
|
10
10
|
> Synthesized from [transitions.dev](https://github.com/Jakubantalik/transitions.dev) by Jakub Antalík.
|
|
11
11
|
|
|
12
|
-
Micro-interactions make the difference between an application that feels static and one that feels responsive, continuous, and physical. Here
|
|
12
|
+
Micro-interactions make the difference between an application that feels static and one that feels responsive, continuous, and physical. Here is the comprehensive catalog of UI transitions, their physics parameters, and exact implementation patterns.
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
## 1. Interaction Transition Catalog
|
|
16
|
+
## 1. Complete Interaction Transition Catalog
|
|
17
17
|
|
|
18
18
|
| # | Pattern Name | Interaction Description | Physics / Curve | Duration / Spring |
|
|
19
19
|
|---|:---|:---|:---|:---|
|
|
@@ -29,43 +29,61 @@ Micro-interactions make the difference between an application that feels static
|
|
|
29
29
|
| **10** | **Success Check** | Circle halo pulses outward while checkmark draws itself along SVG path. | Multi-stage timeline | 350ms total sequence |
|
|
30
30
|
| **11** | **Avatar Group Hover** | Hovered avatar springs up and scales up while neighbor avatars fan apart. | `SPRING_BOUNCE` + Falloff | Stiffness: 300, Damping: 20 |
|
|
31
31
|
| **12** | **Error Shake** | Input shakes horizontally 3–4 times on validation failure then returns to neutral. | Keyframe oscillate | 350ms (`[-4px, 4px, -3px, 3px, 0]`) |
|
|
32
|
+
| **13** | **Banner Stacking** | Notifications stack with scale & elevation falloff; hovering fans into list. | `SPRING_PANEL` | 320ms / stagger 30ms |
|
|
33
|
+
| **14** | **Smoky Dissolve** | Destructive deletion disintegrates element into rising ash and smoke particles. | Particle physics | 600–700ms |
|
|
34
|
+
| **15** | **Drag & Drop Physics** | Dragging card with angular inertia, velocity preservation, and magnetic slot snap. | `SPRING_BOUNCE` | Stiffness: 300, Damping: 18 |
|
|
35
|
+
| **16** | **Dropdown Morph** | Navigation dropdown whose container bounds and caret morph fluidly across tabs. | `SPRING_LAYOUT` | Stiffness: 360, Damping: 32 |
|
|
36
|
+
| **17** | **Get Pro Conic Glow** | Chromatic moving gradient border with ambient blur halo and specular sheen. | Infinite linear / sweep | 1000ms hover sweep |
|
|
37
|
+
| **18** | **Image Open Tilt** | Media preview modal opens with 3D perspective pitch before settling squarely. | `SPRING_PANEL` | Transform perspective 1000px |
|
|
38
|
+
| **19** | **Input Clear Dissolve** | Characters dissolve and scatter upward with particle blur when clearing text. | Staggered float | 350ms / stagger 15ms |
|
|
39
|
+
| **20** | **Learn More Hover** | Action link where arrow flies out right edge and loops in from left with underline. | `EASE_OUT` | 450ms |
|
|
40
|
+
| **21** | **Matrix Dot Loader** | Sci-fi dot grid whose scale and opacity oscillate in harmonic diagonal phase waves. | Sine wave / harmonic | 1200ms loop |
|
|
41
|
+
| **22** | **Organic Shimmer** | Natural fluid light sheen moving across card surfaces at oblique angles. | Ease-in-out sweep | 2400ms cycle |
|
|
42
|
+
| **23** | **Pro Gradient Text** | High-velocity multi-stop moving gradient typography with mask clipping. | Continuous linear | 6000ms loop |
|
|
43
|
+
| **24** | **Skeleton & Reveal** | Structured bone skeleton that cross-fades directly into live UI with zero CLS. | `SPRING_PANEL` | 300ms crossfade |
|
|
44
|
+
| **25** | **Spinner Check Morph** | Circular SVG arc spinner that morphs seamlessly into an animated checkmark path. | Dual-stage timeline | 500ms total |
|
|
45
|
+
| **26** | **Spinning Counter** | Mechanical odometer dial with vertical digit slots and velocity spring damping. | `SPRING_SWAP` | Stiffness: 460, Damping: 30 |
|
|
46
|
+
| **27** | **Texts Reveal** | Staggered word-by-word typographic entrance rising from masked overflow slots. | `EASE_OUT` | 500ms / stagger 40ms |
|
|
47
|
+
| **28** | **Thinking States** | Cognitive AI status surface morphing through pulse dots and cognitive stages. | `SPRING_SWAP` | 2400ms stage interval |
|
|
48
|
+
| **29** | **3D Card Tilt** | Mouse-following perspective tilt with dynamic specular glare highlight. | `SPRING_MOUSE` | Stiffness: 200, Damping: 15 |
|
|
49
|
+
| **30** | **Bouncy Accordion** | Expandable panel that springs open with natural overshoot and content crossfade. | `SPRING_PANEL` | Stiffness: 420, Damping: 40 |
|
|
50
|
+
| **31** | **Confetti Burst** | Celebratory radial particle explosion firing from trigger coordinates. | Gravity + velocity decay | 1200ms dissipation |
|
|
51
|
+
| **32** | **Gooey Plus Menu** | Action FAB that splits into radial sub-action buttons with SVG gooey filter. | `SPRING_BOUNCE` | Stiffness: 320, Damping: 22 |
|
|
52
|
+
| **33** | **Streaming Response** | Live typewriter text streaming with blinking cursor and chunk auto-scrolling. | Linear / RAF | 16–30ms per token |
|
|
53
|
+
| **34** | **Sliding Tabs** | Segmented tab indicator that glides smoothly under active label via layoutId. | `SPRING_LAYOUT` | Stiffness: 360, Damping: 32 |
|
|
54
|
+
| **35** | **Floating Tooltip** | Tooltip popping into view with directional origin scaling and arrow indicator. | `SPRING_SWAP` | 180ms |
|
|
55
|
+
| **36** | **Like Button Pop** | Heart icon that shrinks slightly on tap then pops outward with radial star burst. | `SPRING_BOUNCE` | 350ms total |
|
|
56
|
+
| **37** | **Elastic Toggle** | Switch knob that elongates horizontally while dragging before snapping to side. | Spring glide | Stiffness: 700, Damping: 50 |
|
|
57
|
+
| **38** | **Checkbox Check** | Bounding box sinks on tap while checkmark SVG stroke draws diagonally. | `SPRING_PRESS` + PathLength | 280ms |
|
|
58
|
+
| **39** | **Toast Notification** | Bottom/top alert rising in with blur and settling with soft spring deceleration. | `SPRING_PANEL` | Stiffness: 420, Damping: 40 |
|
|
59
|
+
| **40** | **Drawer Pull** | High-velocity sheet dragging with rubber-band resistance beyond boundaries. | `EASE_DRAWER` | Stiffness: 350, Damping: 36 |
|
|
60
|
+
| **41** | **Stacked Cards** | Multiple cards resting in layered deck, fanning apart smoothly on hover. | `SPRING_PANEL` | Stiffness: 360, Damping: 30 |
|
|
61
|
+
| **42** | **Shimmering Text** | Ambient reflective sheen traversing text characters repeatedly. | Linear mask translation | 2000ms loop |
|
|
62
|
+
| **43** | **Dynamic Island** | Floating pill container morphing width, height, and border-radius between states. | `SPRING_LAYOUT` | Stiffness: 400, Damping: 35 |
|
|
32
63
|
|
|
33
64
|
---
|
|
34
65
|
|
|
35
|
-
## 2. Key Interaction
|
|
66
|
+
## 2. Key Interaction Formulas
|
|
36
67
|
|
|
37
|
-
###
|
|
38
|
-
The success check is a compound celebration micro-interaction:
|
|
39
|
-
1. Halo circle scales out with fading opacity.
|
|
40
|
-
2. Background pill or circle pops in with `SPRING_BOUNCE`.
|
|
41
|
-
3. SVG checkmark uses `pathLength: 0` to `pathLength: 1` stroke animation.
|
|
42
|
-
|
|
43
|
-
```tsx
|
|
44
|
-
<motion.svg viewBox="0 0 24 24" className="size-6 text-emerald-500" fill="none">
|
|
45
|
-
<motion.circle
|
|
46
|
-
cx="12"
|
|
47
|
-
cy="12"
|
|
48
|
-
r="10"
|
|
49
|
-
stroke="currentColor"
|
|
50
|
-
strokeWidth="2"
|
|
51
|
-
initial={{ pathLength: 0, opacity: 0 }}
|
|
52
|
-
animate={{ pathLength: 1, opacity: 1 }}
|
|
53
|
-
transition={{ duration: 0.3, ease: EASE_OUT }}
|
|
54
|
-
/>
|
|
55
|
-
<motion.path
|
|
56
|
-
d="M8 12.5l2.5 2.5L16 9"
|
|
57
|
-
stroke="currentColor"
|
|
58
|
-
strokeWidth="2"
|
|
59
|
-
strokeLinecap="round"
|
|
60
|
-
strokeLinejoin="round"
|
|
61
|
-
initial={{ pathLength: 0 }}
|
|
62
|
-
animate={{ pathLength: 1 }}
|
|
63
|
-
transition={{ duration: 0.25, delay: 0.2, ease: EASE_OUT }}
|
|
64
|
-
/>
|
|
65
|
-
</motion.svg>
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Pattern 11: Avatar Group Distance Falloff
|
|
68
|
+
### Avatar Group Distance Falloff
|
|
69
69
|
When hovering over avatar $i$, calculate each neighbor's offset based on its distance $|j - i|$:
|
|
70
70
|
$$\Delta x = \operatorname{sign}(j - i) \times \frac{24\text{px}}{1 + |j - i|}$$
|
|
71
71
|
This produces an organic magnetic dispersal effect where immediate neighbors move substantially and distant avatars remain undisturbed.
|
|
72
|
+
|
|
73
|
+
### Success Check Stroke Animation
|
|
74
|
+
```tsx
|
|
75
|
+
<motion.circle
|
|
76
|
+
cx="12" cy="12" r="10"
|
|
77
|
+
stroke="currentColor" strokeWidth="2" fill="none"
|
|
78
|
+
initial={{ pathLength: 0 }}
|
|
79
|
+
animate={{ pathLength: 1 }}
|
|
80
|
+
transition={{ duration: 0.3, ease: EASE_OUT }}
|
|
81
|
+
/>
|
|
82
|
+
<motion.path
|
|
83
|
+
d="M8 12.5l2.5 2.5L16 9"
|
|
84
|
+
stroke="currentColor" strokeWidth="2" strokeLinecap="round" fill="none"
|
|
85
|
+
initial={{ pathLength: 0 }}
|
|
86
|
+
animate={{ pathLength: 1 }}
|
|
87
|
+
transition={{ duration: 0.25, delay: 0.2, ease: EASE_OUT }}
|
|
88
|
+
/>
|
|
89
|
+
```
|