← Back to projects

Open-source component library · Web Components

Zubra UI

81 accessible web components you copy into your own project and own, for plain HTML or any framework, themed with shadcn/ui's variables.

My role: Creator · Maintainer

Browse the components, switch the code samples between HTML, React, Vue, Svelte, and Angular, or open the theme studio.

The problem

Web Components work everywhere, but there was no easy source of good ones to take, read, and change, the way shadcn/ui offers for React.

The solution

Each component installs with the shadcn CLI into your own source folder, either as a Zubra-compiled module or as a single plain custom element with no dependencies and no build step. Themes use shadcn/ui's variable names, so an existing shadcn theme applies as is. Blocks combine components into pages such as sign-in, settings, pricing, and a dashboard shell.

My contributions

  • Wrote 81 components in Zubra: form controls, navigation, overlays, charts, layout primitives, and app pieces such as a chat message and kanban column.
  • Published each one through the shadcn CLI as a compiled module and as a dependency-free plain element.
  • Built five themes that set colours, fonts, corners, and motion for a whole page or one section.
  • Built a theme studio that checks contrast against WCAG AA as you design, and a page composer that exports a working page.
  • Added zubra-imager, which turns a folder of photos into web-ready images and strips their metadata.

Behind the project

Zubra UI is the first real library written in Zubra, so it doubles as a test of the compiler. open.parlor and open.blog's Studio both use its components.

Engineering decisions

Offering every component two ways, compiled and as a plain element, doubles what can go wrong. The test suite runs once with the compiled modules and again with every component swapped for its plain element, so both are held to the same checks.

Testing

Tests install components with the real shadcn CLI into fresh projects, then check every page in Chromium for roles, accessible names, keyboard behaviour, contrast, axe findings, and phone widths. CI runs both the compiled and plain-element passes. I built the site from source and captured these screens locally.

Repository
zubra-js/zubra-ui
Repository updated