Deprecated repository. Development moved to the aragon/app monorepo: https://github.com/aragon/app/tree/main/packages/gov-ui-kit. Do not make changes here.
Published React 19 + TypeScript component library for Aragon governance UIs. This is a single package shipped to npm and consumed downstream (including aragon/app), so public exports, peer dependencies, and semver are part of the product contract.
Use pnpm only. Node is pinned in .nvmrc; pnpm and engine requirements live in
package.json and pnpm-workspace.yaml (engineStrict: true). npm/yarn installs fail.
- Setup: install pnpm (https://pnpm.io/installation; pnpm ≥10 self-manages the version pinned
in
packageManager, no corepack needed) →pnpm install→pnpm run setup(husky hooks). pnpm storybook— Storybook dev server on :6006; primary component dev surface.pnpm build— Rollup build todist/plus compiledbuild.css.pnpm build:storybook— static Storybook build used in CI.pnpm test— Jest. Variants:pnpm test:watch,pnpm test:coverage.pnpm type-check—tsc --noemit.pnpm lint— Biome check with writes.pnpm lint:check— no writes.pnpm agents:check— verify this file's scripts, paths, and agent entry points (runs in CI).pnpm agents:sync— regenerate.github/copilot-instructions.mdfrom AGENTS.md.pnpm css:check— verifybuild.cssstill matches a source compile (runs in CI afterpnpm build).
Before a PR: pnpm lint:check && pnpm type-check && pnpm test.
CI also runs pnpm build, pnpm build:storybook, pnpm test:coverage, and on PRs
pnpm changeset status --since origin/main. A changeset is required only when src/**
changes (.changeset/config.json).
- Single package, not a workspace.
pnpm-workspace.yamlhas pnpm settings/overrides only; nopackages:globs.turbo.jsoncacheslint:check,type-check, andtest. - One public JS entry.
src/index.tsre-exports./coreand./modules, which re-export theirassets,components,hooks,types, andutilsbarrels. Every public symbol must ride this chain intodist/index.es.js. - Public package entries:
.,./index.css,./build.css. Do not add subpath exports or tell consumers to import fromdist/…. src/core/= reusable UI primitives: button, dialog, dropdown, forms, tooltip, tag, dataList, accordion, and similar generic building blocks. No governance flow logic here.src/modules/= governance-domain composition: wallet, vote, proposal, dao, member, asset, transaction, smartContract, action, and address components built from core + peers.- Styling: Tailwind CSS v4, CSS-first. There is no
tailwind.config.js. Rootindex.cssimports./src/index.cssandtailwindcss;src/index.csspulls in core + theme CSS. Tokens live undersrc/theme/tokens/via@themeand expose the--color-*scale used as utilities such asbg-primary-500andtext-neutral-800. - Icons: SVG imports are transformed by SVGR in Rollup/Storybook. Adding an icon means
adding the SVG under
src/core/assets/icons/and registering it insrc/core/components/icon/iconType.tsandiconList.ts(checked-in registries). - Docs/tests: component docs are co-located
*.stories.tsx; tests are co-located*.test.tsx/*.spec.ts(x). Storybook readsdocs/**/*.@(md|mdx),src/**/*.stories.@(js|jsx|ts|tsx), andsrc/**/*.@(md|mdx). - Agent entry points:
AGENTS.mdis canonical.CLAUDE.mdimports it via@AGENTS.md, and Cursor readsAGENTS.mdnatively..github/copilot-instructions.mdis a generated byte-copy ofAGENTS.md(Copilot code review does not follow symlinks); regenerate it withpnpm agents:syncafter editing this file —pnpm agents:checkfails if it drifts.
- No raw hex/rgb in components or CSS. Use token-backed utilities; colors must work in light and dark themes.
- No Tailwind arbitrary spacing/values (
p-[17px],w-[42%]). Use the token/scale. - No component without a co-located
*.stories.tsx. Storybook is the docs source of truth. - Do not build custom dropdown/dialog/tooltip primitives outside the kit. Reuse the
Radix-based primitives in
src/core/components. - Do not edit design-token sources (
src/theme/tokens/**) without CODEOWNERS review (@aragon/app-team). Tokens are the theming contract. - Preserve accessibility when composing. Radix gives primitives their a11y; components in
src/modulesmust keep labeling, focus order, and keyboard interaction intact, and rely on design tokens for contrast. - Test through the accessible surface. Prefer
getByRole/getByText/getByLabelText; do not assert on class names, snapshots, or internal DOM structure. - Do not edit generated build artifacts:
dist/,build.css,storybook-static. - Do not add a CSS minifier to the
build.csspipeline. It is minified by Tailwind's own optimizer inrollup.config.mjs; a nesting-unaware pass merges the selector lists of nested variant rules and silently corrupts the published bundle.pnpm css:checkenforces this. - Do not add ESLint or Prettier. Lint/format is Biome via Ultracite.
- Do not move peer deps into
dependencies: react, react-dom, react-hook-form, @tanstack/react-query, viem, wagmi, tailwindcss, @tailwindcss/typography. - Do not break public API casually. Removing/renaming an exported symbol or prop is a breaking change and needs a deliberate Changeset.
- Kit/app boundary litmus test. Generic, reusable, non-domain UI belongs in
src/core. Governance-domain composition belongs insrc/modules. App-specific side effects, backend orchestration, or aragon/app flows belong in aragon/app, not this package.
src/core/components/— reusable primitives and their stories/tests.src/modules/— governance feature components and composition.src/theme/tokens/— design-token source; CODEOWNERS-gated (@aragon/app-team).docs/codingGuidelines/— dependency and coding guidance.docs/,.storybook/main.ts,.storybook/preview.tsx— Storybook docs/config.package.json,pnpm-workspace.yaml,turbo.json— scripts, deps, pnpm/Turbo rules.rollup.config.mjs,svgo.config.js,postcss.config.js— build and asset pipeline.scripts/— the checks CI runs outside Biome/tsc/Jest:check-agents-md.mjs,sync-agents.mjs,check-build-css.mjs. Plain Node, no framework; keep new checks in that shape..github/workflows/library-test.yml— CI truth for build/test/type/lint/changeset gates.