@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

ComponentDescription
ButtonPrimary action component with size, variant, and loading states
NavigationSite header and mobile navigation
HeroPage hero sections with multiple layout variants
RichTextLexical-based rich text renderer
PagePage-level layout primitives
BlocksPayload CMS block renderers
LinksLink components with internal/external detection
IconsIcon 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.