# Basecoat – Agent Guide ## What is Basecoat? Basecoat is a vanilla JavaScript/HTML/CSS port of shadcn/ui components. It reuses shadcn/ui's design patterns and Tailwind CSS classes while maintaining semantic HTML, native browser elements, and full accessibility (ARIA attributes, proper hierarchies, keyboard navigation). The goal is to provide shadcn-quality components without React dependencies. Basecoat is not a literal DOM port of shadcn/ui. It is an alternative implementation with the same visual language and comparable component coverage, but with simpler markup, less JavaScript, less CSS, and no React/runtime primitive dependency. ## Quickstart - Install deps: `npm i` - Dev docs server: `npm run docs:dev` - Build CSS/JS: `npm run build` - Build static docs: `npm run docs:build` ## What to edit (and what not) - Edit sources only: - `src/css/base/base.css` – Shared base layer, tokens, and semantic utility classes - `src/css/components/*.css` – Component CSS classes (Tailwind + custom) - `src/css/styles/style-*.css` – Style-pack visual rules (`vega`, `nova`, `maia`, `lyra`, `mira`, `luma`, `sera`, `rhea`) - `src/css/basecoat.css` – Aggregate CSS entrypoint - `src/js/*.js` – Individual component JS files (kebab-case, ESM) + `basecoat.js` (component registry) - `src/nunjucks/*.njk` and `src/jinja/*.html.jinja` – Component template macros - `docs/src/components/*.md` – Component documentation pages with examples; Markdown can embed Nunjucks macros - `docs/src/_includes/` – Layout templates, partials, and navigation - Do not edit build outputs: - `packages/*/dist` – built CSS/JS bundles - `_site/` – generated docs site ## Project layout - Workspaces: root npm workspace with publishable packages in `packages/*`. - Packages: - `packages/css` – built CSS and JS bundles under `dist/`. - `packages/cli` – CLI; distributed assets live under `dist/`. - Docs site: `docs/src` (Eleventy); output goes to `_site/`. ## Style system - Basecoat keeps its own component class API (`btn`, `dialog`, `popover`, etc.). Do not introduce shadcn `cn-*` classes into Basecoat source. - Shadcn/ui style packs are used as reference material, but must be mapped onto Basecoat markup and selectors. - Style-pack architecture is one file per style: - `src/css/styles/style-vega.css` - `src/css/styles/style-nova.css` - `src/css/styles/style-maia.css` - `src/css/styles/style-lyra.css` - `src/css/styles/style-mira.css` - `src/css/styles/style-luma.css` - `src/css/styles/style-sera.css` - `src/css/styles/style-rhea.css` - `basecoat.css` and the default CDN bundle remain Vega-compatible for Basecoat backward compatibility. This is a Basecoat compatibility decision; upstream shadcn/ui's current default generated config is Nova. - Non-default styles must be selected through standalone style bundles (`basecoat-