Launchable Motion

Components / UI

Grow to bounds

Use it for a card, modal or panel taking over: a rounded panel grows from a small rect to the whole host while its content keeps its size at the centre.

Install

With this registry set in hyperframes.json (see the docs):

npx hyperframes add grow-to-bounds

Use it in a composition

It fills whatever box you give it, so set the host element's size and position. Set values withdata-variable-values. It also takes HTML in a <template data-slot="grow-to-bounds-content"> in the host page.

<div data-composition-id="grow-to-bounds" data-composition-src="compositions/grow-to-bounds.html"
     data-start="0" data-duration="3" data-track-index="1"
     style="position:absolute;left:0;top:0;width:1920px;height:1080px"></div>

Variables

VariableTypeDefaultWhat it changes
fromstring20,50,18,12x,y,w,h in percent of the host where the panel starts.
colorcolor#ffffffPanel colour.
radiusnumber3.5Corner radius as percent of host height.
atnumber0.05Seconds before the panel appears.
durationnumber0.4Seconds to reach the bounds.
textstringBrand kit created successfullyDefault content when no slot is given: typed after the panel lands.
cpsnumber26Typing rate of the default content.
orbAcolor#8de07aDefault content orb, light side.
orbBcolor#1e8f4fDefault content orb, dark side.
greycolor#a39da1Landing colour of typed characters.
inkcolor#1a1418Text colour.
fontfont"Instrument Serif",Georgia,serifDisplay face.
groundcolortransparentBackground; transparent to overlay.