UI

Installation

Add the source foundation to your React application.

Requirements

  • React and React DOM 19.2.3 or later.
  • TypeScript and a bundler with CSS Modules support.
  • Node 22.13+ (22.x) or 24+ for this repository's development tooling.

Run this documentation

npm ci
npm run dev

Open localhost:5173. The documentation app uses Next.js, Fumadocs, and MDX.

Install the private package

@uthereal/ui is a private package hosted in Uthereal-Labs/uthereal-ui. Every tagged release publishes to GitHub Packages (scoped to @uthereal-labs/ui) and attaches a packed tarball to the GitHub Release.

Configure .npmrc in your app (and set NODE_AUTH_TOKEN to a GitHub token with read:packages):

@uthereal-labs:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}

Install aliased as @uthereal/ui so all component imports stay @uthereal/ui/<slug>:

npm install @uthereal/ui@npm:@uthereal-labs/ui@^0.2.0

Option 2: Direct GitHub Release tag

npm install github:Uthereal-Labs/uthereal-ui#v0.2.0

Option 3: Local tarball

npm pack
npm install /path/to/uthereal-ui-0.2.0.tgz

The package ships src/ and its documentation (README.md, CHANGELOG.md, upstream.json). It does not include this documentation website or test fixtures. Next.js and Fumadocs are development dependencies of this repository, not runtime dependencies of your app.

Next.js

Enable transpilation for the source package in your application's Next.js configuration:

// next.config.ts
import type { NextConfig } from 'next'

const config: NextConfig = {
  transpilePackages: ['@uthereal/ui'],
}
export default config

Use components from a Client Component when passing event handlers:

'use client'
import { Button } from '@uthereal/ui/button'

export function SaveButton() {
  return (
    <Button
      label="Save"
      action="save"
      onAction={(action) => console.log(action)}
    />
  )
}

Components without state or event handlers, such as Stack and Grid, also render in Server Components.

Vite

Vite handles the package's TypeScript and CSS Modules directly. Import components using the same public paths, such as @uthereal/ui/button. React Compiler is optional.

Optional agent integration

Use @uthereal/ui/agent for validated single-component edits. Use @uthereal/ui/composition and @uthereal/ui/composition/react to compose registered components with json-render. See Building with agents.

On this page