Essentials›Motion
Motion
Change size or position in CSS and the glass flows there. You don't animate anything yourself.
The left one has everything turned up, the right one has everything off.
Settings
| Attribute | Range | What it does |
|---|---|---|
morph | 0 to 1 | Softness of the flow. 0 jumps straight to the new shape |
jelly | 0 to 1 | Stretch while moving and under a drag |
press | 0 to 1 | How much the glass swells when held |
glow | 0 to 1 | Light that spreads from under the finger |
follow | 0 to 1 | How far the light chases the pointer |
Appear
Add appear to materialise on load. show() and hide() return a promise, so you can remove the element when it is gone.
await glass.hide();
glass.remove();