Earl & Sip
A fussy teapot and a tiny cup who always wants more. One tag brings both of them.
Earl & Sip
<!-- once, anywhere on the page --> <script src="https://cdn.jsdelivr.net/npm/piixpal@0.4/piixpal.min.js"></script> <h2> … <piix-pal pal="earl"></piix-pal> </h2>
<!-- just earl (the shared engine loads itself, once) --> <script src="https://cdn.jsdelivr.net/npm/piixpal@0.4/dist/c/earl.min.js"></script> <h2> … <piix-pal pal="earl"></piix-pal> </h2>
<!-- attaches itself to the first h2: nothing else to add --> <script src="https://cdn.jsdelivr.net/npm/piixpal@0.4/dist/c/earl.min.js" data-pals="earl@h2"></script>
await import("https://cdn.jsdelivr.net/npm/piixpal@0.4/dist/c/earl.min.js");
Piixpal.add("earl", "h2");
// npm install piixpal
import { PiixPal } from "piixpal/react";
<h1>
Hello
<PiixPal pal="earl" />
</h1>
npx shadcn@latest add https://piixpal.dvkk.dev/r/earl.json
import { Earl } from "@/components/piixpal/earl";
<h1>
Hello
<Earl />
</h1>
// main.js: app.use(Piixpal) from "piixpal/vue" <h1> Hello <piix-pal pal="earl" /> </h1>
<script>import Piixpal from "piixpal/svelte";</script> <Piixpal /> <h1>Hello <piix-pal pal="earl"></piix-pal></h1>
Options
at- where Earl stands, 0–1
poke Earl- pours now
poke Sip- hearts
How it plays
- Earl hums, tilts and pours a real stream of tea.
- Sip fills up and steams.
- Full cups hiccup.
- Sip slowly drinks it all, and Earl pours again.
It loops with a little randomness, never blocks a click, and stands still for people who prefer less motion. Put the tag inside the element they should live on, or point at one with on="selector".