v0.4 · 118 components · free & open source

Tiny pixel creatures that live on your website.

They crawl on your headings, nap on your paragraphs, perch on your buttons and bounce on your footer. Throw them around. Line them up. Fill a stage with hundreds. One script tag, zero dependencies, free forever.

Meet the pals

poke them. drag the jelly. Hover the buttons and see who flies off.

<!-- 1. add the script -->
<script src="piixpal.js"></script>

<!-- 2. put a pal inside anything -->
<h1>Hello world
  <piix-pal pal="bitbug"></piix-pal>
</h1>
The pals · 42 and counting

Tiny roommates. Each one has a job.

Every pal is a component with its own personality: what it lives on, what scares it, what happens when you poke it. Play with them, then copy the tag.

Hello, world.

Bitbug

No.01 · crawl

A lime beetle with one very curious antenna. Walks the real outline of your letters, hops across spaces, and bolts when your cursor gets close.

  • climbs letters
  • cursor-shy
  • flips when poked
<piix-pal pal="bitbug"></piix-pal>

Boing

No.02 · bounce

A coral jelly drop with more energy than sense. Hops along your footer, leaps at your cursor, and goes boing when you throw it.

  • draggable
  • throwable
  • gets dizzy
<piix-pal pal="boing"></piix-pal>

Some light reading for a slow afternoon.

Moss

No.03 · mind

A mushroom with a book and no interest in you. Reads on your paragraphs, flips pages, dozes off. Poke it three times and it moves somewhere quieter.

  • reads
  • naps
  • holds grudges
<piix-pal pal="moss"></piix-pal>

Lurk

No.04 · peek

Big eyes, little hands, zero courage. Hides behind your cards and peeks over the edge. Its eyes follow you, but only from a safe distance.

  • peeks
  • watches you
  • ducks
<piix-pal pal="lurk"></piix-pal>

Thread

No.05 · hang

A small spider on a long string. Dangles from your nav, swings when you scroll, zips up when you reach for it and lowers itself back down.

  • swings
  • scroll-aware
  • yo-yos
<piix-pal pal="thread"></piix-pal>

Pip

No.06 · perch

A round bird who loves a good button. Sits on your CTAs, pecks, sings. Hover its perch and it flies a loop, then lands on the next one.

  • perches
  • flies
  • sings
<piix-pal pal="pip"></piix-pal>
Sprites · 20 and counting

Or just paste a little face.

Sprites sit inline like an image: no positioning, no setup. Their eyes follow your cursor, they blink, breathe and hop when clicked. Go on, wave at them.

Big sprites · chunky 3D, turn toward your cursor
<piix-sprite name="mochi"></piix-sprite>Browse all sprites
Crowd · hundreds on one stage

Or bring the whole crowd.

One tag, a stage full of tiny agents. They wander and high-five, swarm your cursor, or walk into place to spell a word. Click the floor to drop one in. Grab one and throw it.

<piix-crowd mode="…">
New ways to play

They notice what you do.

Type a password and Peeper covers its eyes. Tick the robot box and Beep panics. Scroll and Scrolly runs along the bottom of your screen. Select text, copy it, hit deploy.

peeper · try typing
peeper · it won't look
beep · tick it
Deploy
rocket · click it
termi + frog · the frog wants your cursor
Superpowers

They leave the page.

Play your site as a game. Snow that settles on your letters. Toasts by pigeon. A pull-chain for dark mode. Pets in browser tabs, desktop plants, tours, uploads, carts, cookie banners.

pix · click it, then ← → ↑

Play me

JumpHigher
weather · swipe through it

Let it snow

pidge · toasts by pigeon
bulb · pull the chain

Lights?

How it works

Two lines of HTML. Zero lines of config.

A pal lives on whatever element it's inside. It reads the page for itself: letter outlines, edges, buttons, scroll. You never position anything.

  1. Add the script

    One file, no build step, no dependencies. Works in plain HTML, React, Vue, Svelte, Astro, Webflow and Framer embeds.

  2. Drop a pal inside something

    Put <piix-pal pal="moss"> inside a heading, a card, a footer. Or point it from anywhere with on="#footer".

  3. It figures out the rest

    Bitbug walks the real glyph contours, Lurk finds the card's edge, Pip hops between every match of on=".btn". They pause off-screen, respect reduced motion and never block a click.

Type anything here

Pal

      
API

Every attribute is optional.

Great defaults with nothing set. When you want control, it's plain HTML attributes, two events and two functions.

<piix-pal>
AttributeWhat it doesDefault
palWhich character: bitbug boing moss lurk thread pipbitbug
onCSS selector of what to live on. Several matches give Pip more perches.parent
doSwap the behaviour: crawl bounce mind peek hang perchits own
atWhere along the element, from 0 (left) to 1 (right).random
scaleSize of one sprite pixel, in CSS pixels.3–4
hueRecolour it by rotating the hue, in degrees.0
edgetext walks the glyph outlines, box walks the element's top edge.text
speed energy lengthCrawl speed, bounce energy, thread length.1 · 1 · 70

Events + methods

// a pal was poked
pal.addEventListener('piix:poke', e => …)

// poke it yourself
pal.poke()

// tuck pals under a sticky header
:root { --piix-z: 40 }

Draw your own pal

Piixpal.sprite('blip', {
  w: 6, h: 4, does: 'crawl',
  palette: { k: '#000', g: '#c6f432' },
  frames: { walk: [[
    '.kkkk.',
    'kgkgkk',
    'kggggk',
    '.k..k.' ]] }
})

Pixels are strings. Any pal works with any behaviour that finds the clips it needs.

Install

Free, open source, yours.

MIT licensed. Use it on client work, side projects, your portfolio, your 404 page. No sign-up and no tracking. A star on GitHub is plenty.

Everything

One script tag

All 118 components, about 95 KB gzipped, served free by jsDelivr. Then paste any tag.

<script src="…/piixpal.min.js">
Lightest

Just the ones you use

Every pal and sprite has its own 1–4 KB file. The shared engine loads itself, once.

…/dist/c/kitty.min.js
No markup

Webflow, Framer, WordPress

Say what goes where, right on the script tag. Nothing else to touch.

data-pals="bitbug@h1, boing@footer"
Frameworks

React, Vue, Svelte

Drop-in wrappers and TypeScript types. Or just use the tags: they're web components.

<PiixPal pal="bitbug" />
1–4 KBper component, plus a 16 KB shared engine
1 loopone shared animation loop, paused off-screen
0 clicksblocked. Pals only catch clicks on themselves
A11yrespects reduced motion, hidden from screen readers