Framework-agnostic design system with CSS tokens, semantic components, layouts, and accessible Web Components.
Repository version:
v0.4.0. The npm badges show the currently published package versions. See ROADMAP.md for planned work, CHANGELOG.md for release history, VERSIONING.md for the release policy, and RELEASING.md for the pre-release review.
Browse the visual documentation at luisrodonccs.github.io/simplest-ui.
npm install @luisrodonccs/simplest-uiimport "@luisrodonccs/simplest-ui/tokens.css";
import "@luisrodonccs/simplest-ui/styles.css";
import "@luisrodonccs/simplest-ui/components.js";For one interactive element only:
import "@luisrodonccs/simplest-ui/components/drawer";| Entrypoint | Purpose |
|---|---|
tokens.css |
Color, spacing, typography, radius, shadow, motion, and effect tokens. |
reset.css |
Optional global reset. |
base.css |
Base typography, utilities, and layouts. |
components.css |
Component classes without a global reset. |
styles.css |
Complete bundle ordered in sui.reset, sui.base, and sui.components layers. |
Every CSS component is also available as an individual import. Import tokens.css first; add base.css only when you need its typography, utilities, or layouts.
import "@luisrodonccs/simplest-ui/tokens.css";
import "@luisrodonccs/simplest-ui/components/button.css";
import "@luisrodonccs/simplest-ui/components/card.css";This is suitable for vanilla applications and Laravel Blade projects built with Vite. The package uses ui- CSS classes, sui- custom-element names, and --sui- tokens.
Use the companion generator to start a Vite project or add the integration files to an existing Laravel project:
npm create @luisrodonccs/simplest-ui@latest my-app -- --template vanilla-vite
npx @luisrodonccs/create-simplest-ui@latest . --template laravel-viteFor Laravel packages, use --template laravel-package. Laravel packages should
render compatible Blade markup, while the host application imports Simplest UI once
through Vite. See the visual documentation for the complete integration guide.
Use semantic HTML with ui-* classes. Cards, tables, alerts, avatars, progress indicators, form controls, and layouts are CSS components rather than custom elements.
<article class="ui-card ui-card--glass">
<h2 class="ui-card__title">Project summary</h2>
<p class="ui-card__body">A semantic card component.</p>
</article>
<div class="ui-table-wrap" role="region" aria-label="Users" tabindex="0">
<table class="ui-table">
<caption class="sr-only">Users</caption>
...
</table>
</div>| Element | Import | Highlights |
|---|---|---|
<sui-modal> |
components/modal |
Focus trap, scroll lock, Escape, focus restoration. |
<sui-drawer> |
components/drawer |
Accessible modal side panel. |
<sui-avatar-group> |
components/avatar-group |
Three compact avatars and +N; expands in place, with an optional scrollable named list. |
<sui-dropdown> |
components/dropdown |
Action menu and keyboard navigation. |
<sui-tabs> |
components/tabs |
Arrow-key tab navigation. |
<sui-accordion> |
components/accordion |
Single or multiple disclosure panels. |
<sui-popover> |
components/popover |
Contextual dialog and viewport placement. |
<sui-tooltip> |
components/tooltip |
Automatic aria-describedby, wrapped text and horizontal viewport placement. |
<sui-toast> |
components/toast |
Live announcements and SuiToast.show(). |
<sui-drawer label="Filters" close-label="Close filters">
<span slot="title">Filters</span>
<p>Adjust the current result set.</p>
<div slot="footer"><button class="ui-button" type="button">Apply</button></div>
</sui-drawer>Interactive components expose sui-* custom events and include keyboard behavior, ARIA relationships, visible focus, and reduced-motion support.
Provide direct child avatars with accessible names (aria-label, image alt or
text). Set label for the group and add show-names to display a vertical
list. Named lists show five rows before scrolling by default; set
--sui-avatar-group-visible-rows to change the limit. ArrowUp and ArrowDown
scroll the focused list when it overflows. External scrolling closes the group
with an exit animation; scrolling inside the list does not.
The expanded surface uses the native Popover top layer when available and may
otherwise be clipped by an ancestor. Entry and exit respect reduced motion.
open changes when closing is requested, before the exit animation finishes.
Modal and drawer use the browser's modal top layer, so transformed
or clipped ancestors do not constrain them. Content outside the active dialog
is inert, and dialogs stack in opening order rather than by --sui-z-modal or
--sui-z-drawer-backdrop. Entry and exit respect reduced-motion preferences
and use --sui-duration-normal and --sui-easing-standard.
Setting open = false or calling close() requests a close. The dialog, focus
trap and scroll lock remain active until its exit finishes, when sui-close
fires. updateComplete does not wait for the animation. Wait for sui-close
before removing the element or interacting with the background; reopening during
exit cancels the pending close event. See the 0.4.0 migration guide
before upgrading from 0.3.x.
For an optional full-screen mobile navigation pattern, see Responsive navigation with App Shell and Drawer and the dashboard in the visual documentation. Applications choose their own breakpoint and manage any scroll container outside the drawer.
Override semantic tokens to adapt the full system:
:root {
--sui-color-primary: #7c3aed;
--sui-radius-lg: 0.75rem;
}Use <html data-theme="dark"> to apply the built-in dark token mapping.
| Area | Support |
|---|---|
| Browsers | Chrome, Edge, Firefox, and Safari, last two versions; current Chrome Android and Safari iOS. |
| Environments | Vanilla HTML/JavaScript and Laravel Blade with Vite. |
| Rendering | CSS during SSR; Web Components in the client bundle. |
| Accessibility | WCAG 2.2 AA target; no critical or serious Axe violations. |
React, Vue, Bootstrap, and Tailwind integration are not validated for the 0.3.x release line. See SUPPORT.md for the complete policy, including SSR and known limitations.
The visual documentation lives in docs/ and supports English and Spanish. It covers every public CSS component, Web Component, layout, token category, and example page.
npm run docs:dev
npm run docs:buildThe Dashboard page is available at docs/pages/dashboard.html while running the documentation server.
skills/simplest-ui is a versioned Agent Skill. It guides agents to inspect components.manifest.json, reuse existing primitives first, and only extend the system when composition is insufficient. It is included in the npm package but is not activated automatically. See the installation guide for OpenCode, Claude Code, and other Agent Skills clients.
Unit and component tests use Vitest:
npm testEnd-to-end tests use Playwright and Axe across Chromium, Firefox, and WebKit. They cover documentation navigation, component keyboard and focus behavior, the 320px responsive floor, Axe audits in light and dark themes, and the vanilla and Laravel/Vite consumer fixtures.
npm run test:e2e:install # first run only
npm run test:e2enpm run test:e2e builds the package before starting the suite. Tests fail on any critical or serious Axe violation.
Visual regression tests compare documentation and dashboard screenshots in light and dark themes at desktop and 320px widths. Baselines are stored with the -win32 suffix and generated on Windows to match the dedicated CI job.
npm run test:visual
npm run test:visual:update # after an intentional visual changenpm run typecheck
npm test
npm run build
npm run test:consumer
npm run docs:build
npm pack --dry-runnpm run build validates every package export. npm run test:consumer bundles the Laravel/Vite and SSR fixtures. npm run docs:build verifies that every manifest entry has a visual documentation entry. CI runs these checks plus the Playwright suite.
Read CONTRIBUTING.md. Contributions must preserve the token system, prefixes, semantic HTML, accessibility, tests, manifest coverage, and visual documentation.