feat: motion playground#75
Open
starc007 wants to merge 10 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Standalone
/playgroundroute to learn motion properties hands-on.What
Notes
components/app/playground/. Adding a type = one module + one line initems/index.ts.lib/registry.ts— site chrome, not a distributable component.typecheck, lint and check:registry pass.