Skip to content
muchobienPublic

About

Shared HTML/CSS UI foundation for server-rendered apps and agent-built pages

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

@muchobien/ui

A shared HTML/CSS foundation for server-rendered apps and agent-built pages: one layered stylesheet that styles plain HTML, a closed set of classes and data-* variants, Lucide icons, and six light-DOM custom elements. It targets the latest Chrome and iOS Safari only.

Load it from a CDN

The latest 0.x release:

<meta name="color-scheme" content="light dark" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@muchobien/ui@0/dist/ui.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@muchobien/ui@0/dist/icons.css" />
<script type="module" src="https://cdn.jsdelivr.net/npm/@muchobien/ui@0/dist/ui.js"></script>

This release, pinned with subresource integrity:

<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/@muchobien/ui@0.1.0/dist/ui.css"
  integrity="sha384-tPMDHqV+u9XjxcmxfyAuDgQWhEls1ydKhs9GSnFRWLnFwwmcHiqdX7wuVpAR9dQR"
  crossorigin="anonymous"
/>
<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/@muchobien/ui@0.1.0/dist/icons.css"
  integrity="sha384-rCf3PDlus39mfBTlBx8H3E1lzSAj7z18JXC3006uiEEIJy00XB+lLvlHrEVIA89z"
  crossorigin="anonymous"
/>
<script
  type="module"
  src="https://cdn.jsdelivr.net/npm/@muchobien/ui@0.1.0/dist/ui.js"
  integrity="sha384-zeCNIdh+HgMhXj7eZVsc7IHfBOuEQKE9H/OVgzXEvwSPjPx3ZG7gYfKZYbCbOVX5"
  crossorigin="anonymous"
></script>

icons.css is only needed for icons, ui.js only for the ui-* elements.

Install it in an app

pnpm add @muchobien/ui

Import @muchobien/ui/ui.css, and @muchobien/ui/icons.css and @muchobien/ui/ui.js when you need them. @muchobien/ui/tokens.css has the --mb-* tokens on their own, and @muchobien/ui/vocabulary.json lists every class, data-* value, element and icon.

Check a page

npx -p @muchobien/ui ui-lint page.html

ui-lint reports classes, data-* values, icons and elements that aren't in the vocabulary, colours written by hand, and stylesheets that aren't the library's.

Develop

See AGENTS.md for the layout, commands and rules.

Licence

MIT. The icons are from Lucide under the ISC licence, which icons.css and icons.svg carry.

About

Shared HTML/CSS UI foundation for server-rendered apps and agent-built pages

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages