Ẹwà UI (Beauty in Yoruba language) is Spatialnode's shared React component library.
🎨 Ẹwà UI
Spatialnode's shared React component library
Requirements •
Getting Started •
Structure •
Testing •
Publishing •
Contributing
---
Spatialnode's React component library is a set of shared, reusable UI components built with React, Radix UI, and Tailwind CSS. It's distributed as `@spatialnode/ewa-ui` on npm.
## Requirements
- Node.js `>=20`
- pnpm `10.27.0` (managed via `packageManager` in `package.json` — use Corepack to pick it up automatically)
```bash
corepack enable
```
## Getting Started
1. **Clone the repository**
```bash
git clone git@github.com:Spatialnode/ewa-ui.git
cd ewa-ui
```
2. **Install dependencies**
```bash
pnpm install
```
3. **Start Storybook** to develop and preview components in isolation
```bash
pnpm storybook
```
Storybook runs at
localhost.
## Project Structure
```
ewa-ui/
├── .storybook/ # Storybook configuration
├── src/
│ ├── components/
│ │ ├── ui/ # Base/primitive components
│ │ └── custom/ # Composed/higher-level components
│ ├── stories/ # Storybook stories and example assets
│ ├── lib/ # Shared utilities (e.g. `cn` helper)
│ └── index.ts # Public package entry point / exports
├── dist/ # Build output (generated, not committed)
├── tsdown.config.ts # Build configuration (tsdown)
├── vitest.config.ts # Test configuration
└── tsconfig.json # TypeScript configuration
```
New components should be added under `src/components/ui` (primitives) or `src/components/custom` (composed components), then re-exported from `src/index.ts` to be included in the published package.
## Available Scripts
| Script | Description |
| ------------------------- | ------------------------------------------------- |
| `pnpm build` | Bundles the library to `dist/` using tsdown |
| `pnpm test` | Runs the test suite o …