Open Source
Licensed under MIT and built in the open on GitHub. Every component, token, and test is public — contribute, fork, or audit anything, anytime. No license fees, no lock-in.
A lightweight component toolkit with everything you need to ship polished products.
MyUI is an open-source UI framework for building accessible, customizable, and beautiful web applications. Fifty-plus components, first-class TypeScript, and design tokens that adapt to your brand.
Licensed under MIT and built in the open on GitHub. Every component, token, and test is public — contribute, fork, or audit anything, anytime. No license fees, no lock-in.
Every component ships with semantic markup, full keyboard support, and WCAG 2.1 AA contrast baked in. Focus rings, aria attributes, and screen-reader labels are handled so you don't have to think about them.
Design tokens drive everything — colors, radii, spacing, and type scales. Override a CSS variable or pass a theme object and the entire library re-skins in seconds, light or dark, with zero rebuilds.
Get MyUI running in your project in under a minute. Requires Node 18 or later.
MyUI ships as a single npm package with zero runtime dependencies. Install it with your package manager of choice and import only the components you use — tree-shaking keeps your bundle tiny.
npm install myui
Scaffold a new project with the CLI, or add MyUI to an existing Vite / Next.js app by wrapping it with the MyUIProvider. The provider injects your theme tokens and enables dark mode.
# scaffold a starter project npx myui init cd my-project npm run dev
Every color, radius, and shadow in MyUI maps to a design token. Change a token once and the whole system updates — including dark mode, which toggles automatically with a single class on the root element.
The default palette ships with an accessible indigo primary, nine neutral steps, and semantic success / warning / danger ramps. Swap --myui-primary in your CSS and every button, badge, and link follows.
Import a component and render it. That's the whole API — props are typed, defaults are sensible, and the live preview below is the real thing.
import { Button } from 'myui' <Button>Click me</Button>
48 production-ready components. Click a card to view its documentation.
No components match your search.
Buttons trigger actions. They come in three visual variants and three sizes, render as <button> or <a> automatically, and handle loading states out of the box.
Pick a variant and a size — the preview updates live and the code snippet follows along.
<Button variant="primary">Click me</Button>
Button renders a native button element with a visible focus ring that meets 3:1 contrast against adjacent colors. Disabled buttons use aria-disabled so they stay in the tab order and remain discoverable to assistive technology. When a button shows a loading spinner, its accessible label is updated to "Loading" automatically.
| Name | Type | Default | Description |
|---|---|---|---|
variant | string | default | Visual style: default, primary, or outline. |
size | string | md | Control size: sm, md, or lg. |
disabled | boolean | false | Disables interaction while keeping the element focusable. |
onClick | function | — | Handler fired on activation via click, Enter, or Space. |