@itu/ui
Core component library with CVA-powered variants and auto-extracted props.
Overview
@itu/ui provides 22+ production-ready components used across both the public frontend (apps/web) and the documentation site (apps/docs). Every component:
- Uses CVA to define variant props (size, intent, state) with full TypeScript inference.
- Supports auto-extracted props — the docs site reads CVA variant definitions at build time to generate props tables automatically.
- Ships unstyled markup powered by Base UI headless primitives (not Radix).
- Follows the shadcn/ui pattern — components live in-repo and can be customised directly.
Key components
| Component | Description |
|---|---|
Button | Primary action component with size, variant, and loading states |
Navigation | Site header and mobile navigation |
Hero | Page hero sections with multiple layout variants |
RichText | Lexical-based rich text renderer |
Page | Page-level layout primitives |
Blocks | Payload CMS block renderers |
Links | Link components with internal/external detection |
Icons | Icon wrapper components |
Installation
The package is available to any workspace in the monorepo:
json
{ "dependencies": { "@itu/ui": "workspace:*" } }
5 lines of json code
Usage
tsx
import { Button } from "@itu/ui" export function Example() { return ( <Button variant="primary" size="md"> Click me </Button> ) }
9 lines of tsx code
Component props are auto-documented on individual component pages via CVA variant extraction. Check the Components section for interactive examples.