Liquid card
A card whose face is liquid you can stir.
<piix-liquid-card>WebGLNewEverything, forever.
Stir the surface with your pointer. Click it.
<piix-liquid-card> <h3>Everything, forever.</h3> <p>Stir the surface with your pointer. Click it.</p> </piix-liquid-card>
Look
A glossy liquid surface on the GPU: slow swells roll across it, the pointer drags a wake through it, and a click drops a ring that spreads to the edges. The outline breathes like a drop holding its shape. Your content sits on top.
Installation
<!-- once, anywhere on the page: every component --> <script src="https://cdn.jsdelivr.net/npm/piixpal@0.6/piixpal.min.js"></script>
<!-- just liquid card (the shared engine loads itself, once) --> <script src="https://cdn.jsdelivr.net/npm/piixpal@0.6/dist/c/liquid-card.min.js"></script>
npm install piixpal // once, in your entry file import "piixpal";
// npm install piixpal
import "piixpal";
export default function Page() {
return (
<piix-liquid-card>
<h3>Everything, forever.</h3>
<p>Stir the surface with your pointer. Click it.</p>
</piix-liquid-card>
);
}
Usage
<piix-liquid-card> <h3>Everything, forever.</h3> <p>Stir the surface with your pointer. Click it.</p> </piix-liquid-card>
Examples
Light text on chrome
Bright materials want dark text: tone="light".
Chrome
A mirror you can stir.
<piix-liquid-card look="chrome" tone="light"> <h3>Chrome</h3> <p>A mirror you can stir.</p> </piix-liquid-card>
API reference
| Attribute | What it does | Default |
|---|---|---|
look | chrome ink water honey: the liquid's material | ink |
colors | your own material, three colours: floor, horizon, sky (overrides look) | – |
tone | dark (white text) light (dark text) | dark |
radius | corner radius, px | 26 |
Accessibility
- The content is plain HTML on top; the liquid is a hidden canvas.
- With reduced motion it holds still.