Platform first · Zero JavaScript

Components that ship as CSS, not JavaScript

PoppyUI gives you semantic classes like .btn and .modal on plain HTML. Behavior comes from the browser, so it works the same in React, Angular, Vue, Svelte, SSR and a static page.

Live components

Everything here is real PoppyUI, running with no component JavaScript.

This is a native <dialog>, opened by commandfor. Press Esc or click outside to close it.

  • Pure CSS
  • Zero runtime JS
  • Any framework
  • oklch tokens
  • Light & dark, nestable
  • Accessible by default
  • Your CSS always wins

Clean HTML, nothing to wire up

Write the markup, add a class, and the browser does the rest.

button.html
<button class="btn btn-primary">
  Get started
</button>
modal.html
<button class="btn" commandfor="hi" command="show-modal">
  Say hi
</button>

<dialog id="hi" class="modal" closedby="any">
  <h2 class="modal-title">Hello from the platform</h2>
  <p>No JavaScript was harmed.</p>
  <div class="modal-actions">
    <button class="btn btn-primary" commandfor="hi" command="close">
      Close
    </button>
  </div>
</dialog>

No JavaScript was harmed.

JavaScript shipped
0 B
import to get started
1
themes, nestable per element
2
cascade layers you can override
3

Built on the platform

PoppyUI uses features the browser already ships instead of a JavaScript library. See the README for each feature's Baseline status.

  • <dialog>

    Modals with focus trapping, Esc to close and a real backdrop. No portal, no focus-trap library.

  • popover

    Menus that sit in the top layer and close on outside click. No z-index wars.

  • commandfor + command

    Invoker Commands open and close dialogs and popovers from a plain button. No click handlers.

  • Anchor positioning

    Dropdowns placed next to their trigger, and flipped when there is no room. No positioning library.

  • @starting-style

    Enter and exit animations for elements that appear and disappear. No animation runtime.

  • @layer

    Every rule lives in poppy.* layers, so your own CSS wins without !important.

Themes you can nest

Set data-theme on any element. These two previews sit side by side on one page.

Project overview

light

Visitors

12.4k

Signups

842

Churn

1.9%

Project overview

dark

Visitors

12.4k

Signups

842

Churn

1.9%

your.css
/* Unlayered CSS beats every poppy.* layer. */
.btn-primary {
  --btn-bg: oklch(62% 0.19 150);
  --btn-border: oklch(62% 0.19 150);
}

Every component reads tokens. Override a token, not a selector.

One stylesheet, every framework

There are no wrappers to install. Each framework imports the same CSS file.

  • HTML

    index.html

    <link rel="stylesheet" href="poppy.css">
  • React

    main.tsx

    import "@poppyui/core";
  • Angular

    styles.css

    @import "@poppyui/core";
  • Vue

    main.ts

    import "@poppyui/core";
  • Svelte

    +layout.svelte

    import "@poppyui/core";
  • SSR

    any server

    Render the HTML. Nothing to hydrate.

Start in under a minute

  1. Install the package with pnpm, npm or yarn.
  2. Import the stylesheet once.
  3. Use the classes in your HTML.
terminal
pnpm add @poppyui/core

/* styles.css */
@import "@poppyui/core";