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.
- 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 class="btn btn-primary">
Get started
</button><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>- 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.
popoverMenus that sit in the top layer and close on outside click. No z-index wars.
commandfor + commandInvoker Commands open and close dialogs and popovers from a plain button. No click handlers.
Anchor positioningDropdowns placed next to their trigger, and flipped when there is no room. No positioning library.
@starting-styleEnter and exit animations for elements that appear and disappear. No animation runtime.
@layerEvery 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
lightVisitors
12.4k
Signups
842
Churn
1.9%
Project overview
darkVisitors
12.4k
Signups
842
Churn
1.9%
/* 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
- Install the package with pnpm, npm or yarn.
- Import the stylesheet once.
- Use the classes in your HTML.
pnpm add @poppyui/core
/* styles.css */
@import "@poppyui/core";