@vsn-ux/react-gaia
v0.1.0
Published
React components for the Gaia design system, built on Base UI and styled by @vsn-ux/gaia-styles.
Readme
react-gaia
Common Gaia UI components for React.
- 🔥 Uses storybook;
- 🔥 Follows semantic versioning;
- 🔥 Uses conventional commits together with semantic-release for a better changelog;
- 🔥 Accessibility in mind, with behaviour from Base UI;
- 🔥 Styled only by
@vsn-ux/gaia-styles, the package ships no CSS of its own;
The Angular counterpart is ngx-gaia.
Demo & documentation
Storybook is deployed to GitHub Pages on every push to main. Run it locally with pnpm dev.
Installation
Install this package (React 19 is required):
npm i @vsn-ux/react-gaia @vsn-ux/gaia-stylesImport the required styles inside your global (e.g.
style.css) file:/* load inter font faces, you can skip this if you already have it in your project or want to use CDN */ @import '@vsn-ux/gaia-styles/font/inter.css'; /* global `@vsn-ux/gaia-styles` styles, used by every component */ @import '@vsn-ux/gaia-styles/all.css';Wrap your app in
GaiaProviderto pick the locale of built-in strings (en,nb,sv,daorfi):import { Button, GaiaProvider } from '@vsn-ux/react-gaia'; <GaiaProvider locale="nb"> <Button variant="primary">Save</Button> </GaiaProvider>;
All component modules are "use client", so you can use them from React Server Components.
Browser support
Follows PDAB Compatibility Policy:
the latest major stable version of Firefox, Chrome, Safari and Edge are supported. No support for IE.
Contributing to the library
You are more than welcome to open an issue or create a pull-request.
In the latter case, please make sure the changes follows the same coding principles,
is covered with unit tests and meets the official Gaia Design guidelines. 🙏
| Command | What it does |
| ---------------- | ----------------------------------- |
| pnpm dev | Storybook on http://localhost:6006 |
| pnpm test | Vitest (jsdom + Testing Library) |
| pnpm lint | ESLint |
| pnpm typecheck | tsc --noEmit |
| pnpm build | Library build with tsdown → dist/ |
While we're on 0.x, feat releases a patch and a breaking change releases a minor.
