Getting started
Install the package, render one component, then add what you need. Unseen UI is in early alpha, so APIs can still change between releases.
Every component from one package. Import the stylesheet once and wrap your app in AITheme.
npm install @stackunseen/ui react@^19.3.0 react-dom@^19.3.01. Install from npm
You need React and ReactDOM ^19.3.0, a bundler that handles CSS imports, and the React types if you use TypeScript.
npm install @stackunseen/ui react@^19.3.0 react-dom@^19.3.0@stackunseen/ui-core comes along automatically. Pin the exact version, because alpha releases can change APIs. The latest tag points at the current prerelease; every prerelease is also tagged alpha.
Work from the source repository instead
Clone the repository, then use Node 24.13 or later within Node 24 and pnpm 11.5.0. From the repository root:
pnpm install --frozen-lockfile
pnpm build:packages
pnpm devOpen the development site. Build the packages before you start any app in the workspace that uses them.
For the static website preview:
pnpm --filter @unseen-ui/docs build
node apps/docs/scripts/preview.mjsOpen the website preview. The preview serves the built site; rebuild the docs app after changing a page.
2. Render your first component
Import the base stylesheet once and wrap your interface in AITheme. In Next.js, this interactive example belongs in a Client Component; other React apps can use the same component.
This example keeps a draft and a saved name in memory. Nothing is sent or persisted. Copy it into a .tsx file and render <FirstExample /> from your app:
'use client';
import { useState } from 'react';
import { AITheme, Button, Field, Input } from '@stackunseen/ui';
import '@stackunseen/ui/styles.css';
export function FirstExample() {
const [name, setName] = useState('');
const [savedName, setSavedName] = useState('');
return (
<AITheme>
<form
style={{ display: 'grid', gap: 12, maxWidth: 360 }}
onSubmit={(event) => {
event.preventDefault();
setSavedName(name.trim());
}}
>
<Field label="Your name" required>
<Input
name="displayName"
value={name}
maxLength={80}
onChange={(event) => setName(event.target.value)}
/>
</Field>
<Button type="submit">Save locally</Button>
<p role="status">{savedName ? `Saved locally: ${savedName}` : 'Nothing saved yet.'}</p>
</form>
</AITheme>
);
}The value and the callback live in your app. To save to a server, call your API instead of updating local state, and show the result once it answers. Read Connect to your app before you wire up tools, approvals or anything that runs actions.
Other ways to start
Already have a project? The steps above are all you need. To start fresh, or to begin from a ready-made chat, open one of these.
Start a new Next.js or Vite project
Next.js (App Router):
npx create-next-app@latest my-assistant --ts --app
cd my-assistant
npm install @stackunseen/uiVite:
npm create vite@latest my-assistant -- --template react-ts
cd my-assistant
npm install @stackunseen/uiThen add the chat below as a component and render it from your page. In Next.js, keep the 'use client' line; in Vite it is harmless. Or let the package write it for you; it detects Next.js or Vite, never overwrites a file without --force, and --ai-sdk writes the AI SDK version with a Next.js route:
npx @stackunseen/ui initAdd starters with the shadcn CLI
If your project already uses shadcn/ui, add the same starters from the Unseen UI registry. Each one installs @stackunseen/ui at this release and writes one small file into your components folder; the components themselves stay in the package, so updates arrive as new versions.
npx shadcn@latest add https://unseenui.com/r/chat.json
npx shadcn@latest add https://unseenui.com/r/chat-ai-sdk.json
npx shadcn@latest add https://unseenui.com/r/theme.jsonchat writes a working chat on a local host, chat-ai-sdk adds the AI SDK version and its app/api/chat/route.ts, and theme writes a scoped theme provider. To use the short @unseen/chat form, register the namespace in components.json:
{
"registries": {
"@unseen": "https://unseenui.com/r/{name}.json"
}
}Start from a whole chat
@stackunseen/ui/chat puts the messages, streaming reply, tool cards, suggestions and message box together. It comes with a local stand-in server that streams scripted replies, so you can see it working before you connect anything. Swap in your own server when you're ready; the Chat guide shows how.
'use client';
import { Chat, useLocalHost } from '@stackunseen/ui/chat';
import '@stackunseen/ui/styles.css';
import '@stackunseen/ui/chat.css';
export function Demo() {
const host = useLocalHost({ suggestions: ['Summarize the plan', 'Search notes for renewals'] });
return <Chat host={host} title="Assistant" />;
}3. Add only the entries you need
Everyday controls come from @stackunseen/ui. Bigger pieces such as DataGrid have their own entry and stylesheet, so they only load when you use them. Keep the base CSS and AITheme from the first example.
import { DataGrid } from '@stackunseen/ui/application';
import '@stackunseen/ui/application.css';The DataGrid guide covers rows, sorting and paging. This entry needs no extra packages.
Other optional entries and their dependencies
Each path below is part of @stackunseen/ui. Install the extra packages an entry lists only if you import that entry; React and ReactDOM are always needed. The exact supported versions are under peerDependencies in the package's package.json.
| Entry | Additional peers | Extra CSS |
|---|---|---|
/theme, /status, /code | None | None |
/markdown | react-markdown, remark-gfm, remend | None |
/math | katex | katex/dist/katex.min.css |
/mermaid | mermaid, dompurify | KaTeX CSS for math labels |
/rich-markdown | Markdown peers, remark-math, katex, mermaid, dompurify | katex/dist/katex.min.css |
/highlight | shiki | None |
/terminal | @xterm/xterm, @xterm/addon-fit | @stackunseen/ui/terminal.css |
/viewport | @tanstack/react-virtual | None |
/layout | react-resizable-panels | None |
/sidecar, /workspace, /upload | None | None |
For example, a Markdown response needs these imports after installing its peers:
import { MarkdownResponse } from '@stackunseen/ui/markdown';
import '@stackunseen/ui/styles.css';Each component's page lists the values and callbacks it needs. There are no /button or /icons paths; those come from the main entry.
4. Find your next step
- UI components: controls, layout and rich content.
- AI components: conversations, generated output, execution and review.
- SaaS admin example: a working app with customer records, members and settings.
Customize lets you preview appearance, colors, density and corners. Themes and icons covers AITheme, IconsProvider and building your own header and footer. To connect components to your server, read Connect to your app.
5. Notes for Next.js apps
Three things that only come up with Next.js server rendering. Open one when you need it.
Compound parts in Server Components
Compound components such as Card.Header, Sidebar.Group, Tooltip.Trigger and NavigationMenu.List are undefined when imported into a Next.js Server Component, because the client reference proxy does not carry static properties. Every part is also a top-level named export, so import those there:
import { Card, CardHeader, CardTitle, CardContent } from '@stackunseen/ui';The property form (Card.Header) works in Client Components. Button, Tag, Stat, Stepper, Matrix, Progress, Card, Table, Breadcrumb and the marketing blocks render in Server Components. Controls with local state or handlers are Client Components that a Server Component can render: Select, Avatar, ToggleGroup, Chip, Accordion, Sidecar, Popover, Tooltip, the menus and the dialogs.
Router links
Chip, ToggleGroup in links mode, Stepper, Card and Button with href, and Matrix render native anchors by default. In Next.js that is a full document load on every filter click. Wrap the app once in LinkProvider with the router's link and every one of them renders it instead, with prefetching and client-side navigation:
import Link from 'next/link';
import { LinkProvider } from '@stackunseen/ui';
<LinkProvider component={Link}>{children}</LinkProvider>;The provider is a Client Component that a root layout can render; the components inside keep rendering on the server. useLinkComponent returns the same component for anchors you render yourself. Disabled links stay native and have no destination.
Dark code panels on a light page
Nest a second AITheme with appearance="dark" around HighlightedCodeBlock (or any component) to render it dark inside a light page. The nested provider keeps the parent theme's colors, applies only to what it wraps, and menus or dialogs opened from inside it stay dark too.
<AITheme appearance="dark">
<HighlightedCodeBlock code={code} language="tsx" />
</AITheme>