
UI shape morph (one shape, many states)
@opus-motion-library/ui-shape-morph
One rounded rectangle never cuts: it grows from a button into a loader, a check, a pill, a player, a slider, a toggle, tabs, a chart, a search box and a toast and back, one change per beat on spring physics (leading edges stiffer than trailing edges so it stretches), content cross-blurring inside while the camera keeps the active state framed; the last frame equals the first.
Instalación
node cli/mgl.mjs add ui-shape-morph --to <your-project>/srcCuándo usarlo
- Ideal para
- Product promos, app-store previews, onboarding heroes and "what our app does" loops: edit the `states` table (kind, label, size, radius, colour), set `accent` and `beatFrames` to your music; pairs with cursor-driver.
Especificaciones
- Duración
- 205f · 6.8s
- Tipo de duración
- Fija
- FPS
- 30
- Estilo
- hud, ui
- Licencia
- MIT
Props (9)
statesarray= [{"kind":"button","label":"Get started","width":300,"height":96,"radius":48,"color":"#4F5BD5"},{"kind":"loader","labe…[{kind:'button'|'loader'|'check'|'pill'|'player'|'slider'|'toggle'|'tabs'|'chart'|'search'|'toast', label, width, height, radius (u), color, content?, action? (toast button word, default 'Undo')}] — end with a copy of the first state to loop
accentstring= "#4F5BD5"accent used inside sliders, charts, search caret
backgroundstring= "#EDEBE7"canvas colour (warm grey or near-black)
inkstring= "#17171B"text colour on light states
fontFamilystring= ""UI font family (empty = Inter)
beatFramesnumber= 15frames per state change (15 = 120 BPM)
startFramenumber= 10frame of the first change
frameFillnumber= 0.6fraction of the frame the active state fills (0.6)
cursorboolean= trueshow a small cursor that operates each state