Launchable Motion

Components / UI

Pill shell

Use it as the frame of any input or status: a white pill that fills the host with an optional orb at the left, an arrow button at the right and a content slot between them.

Install

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

npx hyperframes add pill-shell

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="pill-shell-content"> in the host page.

<div data-composition-id="pill-shell" data-composition-src="compositions/pill-shell.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
textstringlaunchable.videoStatic text in the slot when no content slot is provided.
showOrbbooleantrueGradient orb at the left.
showButtonbooleantrueArrow button at the right.
enterrise, grow, noneriserise, grow (from the left cap), none.
fitTonumber1Fraction of the host width the pill settles to (1 = full).
fillAtnumber-1Seconds when the pill flips to the gradient fill. Negative for never.
fillAcolor#6a2fe0Dark stop of the gradient fill.
fillBcolor#eadfffLight stop of the gradient fill.
orbAcolor#ff4fd8Light side of the orb.
orbBcolor#5b1fb8Dark side of the orb.
buttonColorcolor#2b2628Arrow button colour.
pillColorcolor#ffffffPill colour.
shadowbooleantrueSoft drop shadow.
inkcolor#1a1418Text colour.
fontfont"Instrument Serif",Georgia,serifDisplay face.
groundcolortransparentBackground; transparent to overlay.