Overview
@xond/ui is the design system and component library that powers every Xond
frontend. It bundles our React/Vite build tooling with a production-ready set of
Tailwind components, Storybook examples and data-aware widgets.
Key capabilities
- Consistent layout primitives – navigation shells, responsive page templates and grid systems for dashboards, admin portals and public-facing apps.
- Data-driven inputs – reusable form controls (React Hook Form, Zod-ready) aligned with backend DTOs and validation rules.
- Generated views – tables, cards, detail panels and filters produced automatically from Prisma metadata.
- Storybook documentation – every component ships with MDX docs, interactive stories and usage guidelines to keep teams aligned.
- Tailwind configuration – shared tokens, typography and spacing rules that mirror the Nufaza brand.
Folder layout
src/components– base elements, inputs, layouts, data components.src/lib– utilities for JSON formatting, query builders, localization helpers.src/stories– Storybook landing pages and additional guides..storybook/– Storybook configuration aligned with our token design decisions.
Component Architecture
@xond/ui follows a layered architecture:
- Base Components – Fundamental building blocks (Button, Alert, Link)
- Elements – UI primitives (Badge, Breadcrumb, Icons)
- Inputs – Form controls integrated with React Hook Form
- Layouts – Structural components (Modal, PageContainer, Tab)
- Navigation – Navigation components (BottomNavigation, SideNavigation)
- Table – Data display and manipulation (Table, Form, View)
- View – Display components (ValueView, EntityCard)
- Dashboard – Dashboard widgets (StatCards, FrequentModules)
Data-Driven Components
The library's power comes from data-driven components:
- Data Sources – Unified interface for local arrays, remote APIs, and tree data
- Form Generation – Automatic form generation from model definitions
- Table Integration – Tables that automatically handle sorting, filtering, pagination
- Type Safety – Full TypeScript integration with
@xond/apigenerated models
Development Workflows
- Run Storybook
pnpm --filter @xond/ui storybook - Build the library
pnpm --filter @xond/ui build
Documentation Structure
- Getting Started – Installation and setup guide
- Component Categories – Complete component reference
- Data Sources – Understanding data-driven components
- Forms & Validation – Form generation and validation
- Integration – Using with
@xond/apigenerated code - Common Patterns – Real-world patterns for building CRUD pages
- Utility Functions – Field customization utilities
- RBAC – Role-Based Access Control for menus and features
Storybook vs Documentation
- Storybook – Interactive component demos, visual testing, design system reference
- This Documentation – Architecture, integration patterns, data flow, best practices
Use Storybook for exploring components visually, and this documentation for understanding how to integrate and use them in your applications.