motion-pattern
/motion-pattern
Dobiera wzorzec animacji w glimmer-motion i Choreo przed napisaniem kodu: wejścia, wyjścia, przeciąganie i efekty przewijania.
- Autor
- cardstack ↗
- Repozytorium
- boxel ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 27.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Dobiera wzorzec animacji w glimmer-motion i Choreo przed napisaniem kodu: wejścia, wyjścia, przeciąganie i efekty przewijania.
Oryginalny opis (EN)
Choose the right animation pattern with glimmer-motion and Choreo (packages/glimmer-motion, packages/choreo, the Choreo gallery, and host UI that animates with them). Use FIRST whenever adding, changing, or reviewing an animation, transition, enter/exit, layout move, drag, scroll effect, or page transition there — before writing code. Routes to the specific pattern skill.
Jak działa
- Decision table
- The classic wrong reaches
- Ground truth
- Beyond the basic patterns
Podgląd SKILL.md
---
name: motion-pattern
description: >-
Choose the right animation pattern with glimmer-motion and Choreo
(packages/glimmer-motion, packages/choreo, the Choreo gallery,
and host UI that animates with them). Use FIRST whenever adding, changing, or
reviewing an animation, transition, enter/exit, layout move, drag, scroll
effect, or page transition there — before writing code. Routes to the
specific pattern skill.
---
# Choosing the animation pattern
The library is two layers, one package each:
- **The binding** (`glimmer-motion`, `packages/glimmer-motion`) — Motion's engine (`motion-dom`, untouched) driven through
Glimmer: the `{{motion}}` modifier plus `<Presence>`, `<LayoutGroup>`,
`<MotionConfig>`, `<ReorderGroup>`/`<ReorderItem>`.
- **Choreo** (`@cardstack/choreo`, `packages/choreo`) — a region-scoped model on top: `<Choreo>` watches a render pass,
hands you its **changeset** (inserted / removed / kept, with bounds before
and after), and plays a declared timeline over it.
Pick the smallest pattern that states the intent. Escalation order:
element → presence → layout → Choreo. Page transitions and scroll are side
doors, not steps on that ladder.
## Decision table
| The ask sounds like | Pattern | Skill |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- | -------------------------------------------------- |
| "fade/slide/scale this in", hover/tap states, keyframes, variants, stagger | `{{motion}}` with `initial`/`animate`/`transition` | `motion-element` |
| "animate it when it's removed", toasts, list add/remove, modal open/close | `<Presence>` + `exit` | `motion-presence` |
| "it moved because the layout changed", tab indicator, thumbnail → detail of the SAME thing | `layout=true` / `layoutId` / `<LayoutGroup>` | `motion-layout` |
| "first X, THEN everyone moves, THEN Y" — ordering across several elements; z-index for the span of a move; one element's motion computed from another's box; fly to a place that must not deform | `<Choreo>` timeline (+ `{{beacon}}`, both from `@cardstack/choreo`) | `choreo-scene` |
| more than one `<Choreo>` in a tree; an element flying from one region into another (Boxel card between panels) | nested regions + far matching | `choreo-regions` |
| Route/page change | Live DOM crossing: `<Choreo @route>`; intentional snapshots: `animateView` | `magic-move-navigation` / `motion-page-transition` |
| the gallery-card ⇄ demo-page shared-element navigation, or porting that Magic Move recipe | `<Choreo @route>` + paired identities | `magic-move-navigation` |
| drag, swipe-to-dismiss, reorderable list/grid, bottom sheet | `drag` / `<ReorderGroup>` | `motion-drag` |
| parallax, scroll progress, reveal-on-scroll, hide-on-scroll header | `scrollProgress` / `InView` | `motion-scroll` |
| writing or fixing a test that involves motion | `glimmer-motion/test-support` | `motion-testing` |
## The classic wrong reaches
- **View transition for live content.** The gallery filter is a layout
animation, not a view transition: `startViewTransition` snapshots the page
into bitmaps, so running demos/videos/canvases freeze for the crossfade.
`layout=true` moves the real elements. (See the comment in
`packages/choreo-gallery/realm/shell/gallery-grid.gts`.)
- **`layoutId` to fly a row into a trash can.** `layoutId` pairs two real
elements and morphs one into the other — the bin would stretch into a row
shape. A destination that is a _place_, not an identity, is a
`{{beacon}}` + `<c.Move @to={{c.beacon 'trash'}}>` (`choreo-scene`).
- **`setTimeout` to sequence animations.** That is exactly what `<Choreo>`'s
`c.Sequence` exists to replace — its "after" is computed from real
durations, including a spring's settle time.
- **`<Choreo>` for a single element.** If only one element animates and
nothing depends on ordering or another element's measurement, it's
`motion-element` (or `motion-presence` if it exits).
## Ground truth
Every gallery demo is a real component in
`packages/choreo-gallery/realm/stages/<id>.gts` — read the matching one
before inventing an approach. `packages/choreo-gallery/realm/demos/<id>.json`
gives each demo its group, sample and walkthrough, and
`packages/choreo-gallery/realm/notes/*.gts` are the per-demo Deep
Dives — the
_reasoning_ behind each pattern choice (why the inbox uses beacons, how the
interruption model holds, what the playhead samples). Read the note when
modifying its demo.
Docs: `packages/choreo-gallery/realm/docs/guide.md` (tutorial), the package READMEs
`packages/glimmer-motion/README.md` and `packages/choreo/README.md` (API
reference), `packages/choreo-gallery/realm/docs/choreography.md` +
`packages/choreo-gallery/realm/docs/nested-choreo.md` (Choreo design).
A card in a realm imports the same libraries through host's realm shims, under
different rules (no direct motion-dom imports, state shared with host). For
card authoring, follow the `card-motion` skill in boxel-skills instead.
## Beyond the basic patterns
For gates, Follow/Tether, commands, delivery and custom steps, read
`.claude/skills/choreo-create/references/advanced-orchestration.md`.
For 3D coordinates, cameras, picture actors and Film clocks, read
`.claude/skills/choreo-create/references/spatial-and-film.md`.
These routes extend the table; they do not require loading every specialist.
Wersje
W bazie nie ma innych skilli o nazwie motion-pattern.
Migawka bazy z 28.10.2026 · wersja paczki 6bf274eec188 (skrót SHA-256 całej paczki)
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100motion-testing
Pomaga testować animowany interfejs z glimmer-motion/test-support i @cardstack/choreo/test-support, w tym elementy motion, Presence, animacje layoutu i Choreo, bez polegania na sleepach. - 90motion-page-transition
Tworzy przejścia między stronami i trasami przez View Transitions API w kodzie glimmer-motion i Choreo, wskazując, kiedy lepiej go nie używać. - 100page-transition-animation
Dodaje animacje przejść między stronami i trasami za pomocą View Transitions API i Framer Motion, w tym w Next.js App Router oraz przy problemach z animacją wyjścia w AnimatePresence. - 95motion
Obsługuje bibliotekę animacji Motion dla JavaScript, Reacta i Vue: animacje, gesty, przejścia układu, efekty powiązane ze scrollem, wartości ruchu i kontrolery animacji. - 100motion-patterns
Podaje gotowe do produkcji wzorce animacji dla React i Next.js (przycisk, modal, toast, stagger, przejścia stron, scroll, layout) oparte na tokenach i sprężynach motion-foundations. - 100animations
Zbiera wiedzę o animacjach: Framer Motion, animacje CSS, efekty przewijania i dobre praktyki dla komponentów interfejsu.