Lattice is a starter for teams who want their own React component library: a design system they can rename, restyle and publish.
It comes with six components built to the WAI-ARIA patterns. Button has variants, sizes and a loading state that keeps its label for screen readers. TextField wires its label, hint and error with aria-describedby. Switch has the switch role, and works controlled or uncontrolled. Tabs supports arrow keys mirrored for right-to-left layouts, Home/End, and skipping disabled tabs. Dialog uses the native dialog element, so focus is trapped and restored. Tooltip shows on hover and focus, can be hovered itself, and closes on Esc.
Everything is themed with --lt- CSS variables, so a brand change is a few lines, and dark mode is one attribute, with measured contrast in both themes. The library build uses Vite library mode to produce an ES module with React as a peer dependency, a stylesheet and TypeScript declarations, with package exports ready for npm: about 6 kB of JavaScript. A docs site shows a live demo, code and props table for every component, with dark and right-to-left toggles. It's your playground while you build and your team's reference afterwards. It comes with 8 Vitest tests.
Included: the complete project source (no node_modules), .env.example, tests and a README covering setup, using the components, adding new ones, theming, publishing to npm and hosting the docs. Run npm install to start.