Press and pull

px

A glass button that swells when pressed and leans toward the finger like a rubber band, stretching along the lean and staying a capsule.

Drawn while the skill was being made, for a long article on rendering frosted panes in WebGL.

Install

npm install anatomy-figures

In your code

page.tsx
import { PressAndPull } from "anatomy-figures";

<PressAndPull theme="light" />

Or load this figure on its own, so the others never download:

page.tsx
import PressAndPull from "anatomy-figures/press-and-pull";

Theme it

Early examples keep their own light and dark palettes: theme picks one, and --anatomy-card sets the ground.

page.tsx
<PressAndPull
  theme="dark"
  tokens={{ "--anatomy-card": "#000000" }}
/>

Without React

It still draws with React inside, so install react and react-dom next to it.

index.html
import { define } from "anatomy-figures/element/press-and-pull";

define();

<anatomy-press-and-pull theme="light"></anatomy-press-and-pull>
The Creation of Adam, Michelangelo, c. 1512