Skip to content

feat: motion playground#75

Open
starc007 wants to merge 10 commits into
mainfrom
feat/motion-playground
Open

feat: motion playground#75
starc007 wants to merge 10 commits into
mainfrom
feat/motion-playground

Conversation

@starc007

Copy link
Copy Markdown
Owner

Standalone /playground route to learn motion properties hands-on.

What

  • Sidebar of animation types → preview (left, with code below) + controls (right).
  • Spring (stiffness/damping/mass), Tween (duration + draggable cubic-bezier editor), Stagger (count/stagger/delay/direction).
  • Each type: labelled preview, per-control vocab hints, quick-start presets, live copy-paste code.
  • Tween clarity: strobe trail (box position at equal time slices) + a meaning box naming the current ease (linear / easeIn / easeOut / easeInOut / custom).
  • Code panel uses shiki, matching the rest of the site's highlighting, live-updating.
  • Phase-2 types (keyframes, gestures, layout, scroll) shown as disabled "Soon" rows.

Notes

  • Self-contained under components/app/playground/. Adding a type = one module + one line in items/index.ts.
  • NOT part of lib/registry.ts — site chrome, not a distributable component.
  • Nav links added to desktop header + mobile nav.

typecheck, lint and check:registry pass.

starc007 added 10 commits June 27, 2026 08:16
Standalone /playground route to learn motion properties hands-on. Spring,
tween (with a draggable bezier editor) and stagger, each with a labelled
preview, per-control vocab hints, quick-start presets and live copy-paste
code. Self-contained modules under components/app/playground; not part of
the component registry.
Strobe trail and easing meaning box make tween curves legible, shiki
syntax highlighting on the live code panel.
Add keyframes, gestures, layout and scroll types. Each type now ships a
'How it works' panel that decodes the live code in plain English. Keyframe
values are editable (add/remove/change) via a numberlist control with a
coerce hook that resets them when the property changes.
Each checkpoint is a slider bounded per property, captioned with what the
value means (e.g. 150% size, rotated 180deg).
Sidebar pins on scroll. Replace native selects with a springy dropdown
that morphs open from the top with a blur-resolve and staggered items.
Composable select primitives (Select, SelectTrigger, SelectValue,
SelectContent, SelectItem). Panel unfolds out of the trigger edge and
separates with a spring bounce, items stagger in. Playground selects now
use it; registered in the catalog.
Keep items mounted and animate the panel open/closed instead of
mounting/unmounting, so label registrations persist.
Square off the trigger's bottom corners on open and grow the panel flush
from that edge (shared border, same surface) so it reads as the trigger
extending rather than a detached card.
Phase the open: the panel is born attached to the trigger (flush, flat
edge), then drops into a gap as both ends round back with a slight
overshoot — a gooey start-together-then-separate.
Drive the gap with a delayed spring (overshoot is the bounce) instead of
a manual keyframe that tweened down then back up. Restores bounce, kills
the flicky up-move after the panel drops.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant