home/usage

Usage

From zero to shipped in four steps. No framework, no build drama. Then remix the theme for each client.

~2 min setup 1 dependency (gsap) works anywhere
01 Β· install

Four steps to shipped

Copy three files, add GSAP, call one function. That's the whole ceremony.

  1. 1

    Copy the library into your project

    Three files are the whole library. The showcase site files stay behind.

    my-site/ β”œβ”€ index.html └─ ui/ β”œβ”€ tokens.css colors, type, shape, motion β”œβ”€ components.css every .y-* class β”œβ”€ components.js behaviours + yeet.init() └─ search.js only if you use ⌘K search
  2. 2

    Add GSAP and the fonts

    GSAP powers the motion. The fonts are optional but they're the whole vibe.

    terminal
    npm i gsap
    <head>
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,800&family=JetBrains+Mono:wght@500;700&family=Space+Grotesk:wght@500;600;700&display=swap" />
    <link rel="stylesheet" href="/ui/tokens.css" />
    <link rel="stylesheet" href="/ui/components.css" />
  3. 3

    Wake the components up

    One call wires up tabs, accordions, modals, toasts, tilt, magnetic, marquee and the navbar.

    main.js
    import { yeet } from "./ui/components.js";
    
    yeet.init();
    // optional: global ⌘K search
    yeet.search({ items: [{ title: "Pricing", href: "#pricing", emoji: "πŸ’Έ" }] });
  4. 4

    Drop in markup. Ship it.

    Grab any snippet from the docs. This one's live, go on, press it.

    index.html
    <button class="y-btn y-btn--pink"
      data-toast="Shipped! πŸš€"
      data-toast-bg="var(--y-lime)">
      Ship it
    </button>
02 Β· theming

Theme remix

Every client gets their own flavour. Tweak the knobs, copy the overrides, paste after tokens.css.

Accent
Pop color
NEW πŸ§ƒ

Juice drop

Your theme, live. Every token flows through.

theme.css β€” paste after tokens.css
03 Β· recipes

Works with whatever

It's just classes and one init call, so it slots into any stack.

index.html
<script type="module">
  import { yeet } from "/ui/components.js";
  yeet.init();
</script>
04 Β· house rules

Do this, not that

βœ…Override tokens, not components

Change --y-lime once instead of restyling every button.

🚫Stack 5 accent colors in one view

Pick one hero accent plus one pop. Loud β‰  chaotic.

βœ…Keep the ink outlines

The 2.5px border + hard shadow is the signature. Thinner is fine, none is not.

🚫Animate everything at once

Motion should guide. Let one thing pop per moment.

βœ…Respect reduced motion

It's built in. Don't add animations that ignore it.

🚫Put grey text on lime

Use ink on bright colors. Contrast is part of the vibe.

05 Β· faq

Questions, answered

Nope. It's plain HTML classes plus one JS init. Frameworks work too, see the recipes.
Call yeet.init(container) on the new element. Only that subtree gets wired up.
Native inputs under the toggles and checkboxes, ARIA on tabs, accordion and modal, keyboard support for tabs and search, and every animation respects prefers-reduced-motion.
Yes, that's what the theme remix is for. Ship a small theme.css with token overrides per client.
The CSS is small. GSAP is the main weight; if a site doesn't need motion, you can skip components.js and still use every style.