Luna & Pup
The moon rises over your element, and a wolf pup sings to her. One tag brings both of them.
Luna & Pup
<!-- once, anywhere on the page --> <script src="https://cdn.jsdelivr.net/npm/piixpal@0.4/piixpal.min.js"></script> <h2> … <piix-pal pal="luna"></piix-pal> </h2>
<!-- just luna (the shared engine loads itself, once) --> <script src="https://cdn.jsdelivr.net/npm/piixpal@0.4/dist/c/luna.min.js"></script> <h2> … <piix-pal pal="luna"></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/luna.min.js" data-pals="luna@h2"></script>
await import("https://cdn.jsdelivr.net/npm/piixpal@0.4/dist/c/luna.min.js");
Piixpal.add("luna", "h2");
// npm install piixpal
import { PiixPal } from "piixpal/react";
<h1>
Hello
<PiixPal pal="luna" />
</h1>
npx shadcn@latest add https://piixpal.dvkk.dev/r/luna.json
import { Luna } from "@/components/piixpal/luna";
<h1>
Hello
<Luna />
</h1>
// main.js: app.use(Piixpal) from "piixpal/vue" <h1> Hello <piix-pal pal="luna" /> </h1>
<script>import Piixpal from "piixpal/svelte";</script> <Piixpal /> <h1>Hello <piix-pal pal="luna"></piix-pal></h1>
Options
at- where the moon hangs, 0–1
poke Luna- blushes
poke Pup- howls
How it plays
- The moon rises softly above the element.
- Pup looks up and howls.
- Luna blushes and floats a little higher.
- She smiles when your cursor comes near.
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".