---
name: kortix-ui
description: "Build React UI with @kortix/ui, the Kortix component library and the whole Kortix session experience as modules (session workspace, thread, composer, side panel, files, file viewer, terminal, workspace sidebar and home, customize pages): Kortix Apps, white-label hosts, custom dashboards on @kortix/sdk and apps/web. Load before you write a component, a page, a chat or session view, a custom dashboard or App, or a className in a React host that renders Kortix UI, or when you theme Kortix components for another brand. Covers setup, the module map, which component to compose, banned primitives, tokens, the dashboard guide, white-label theming and the verify steps."
---
# @kortix/ui
`@kortix/ui` is the one React component library for every Kortix surface: `apps/web`, Kortix Apps, the
white-label demo and SDK customer apps. Components are Tailwind v4 class strings that read CSS variables.
Docs: https://kortix.com/docs/developers#kortix-ui. Live catalog: https://kortix.com/design-system.
Install: `npm i @kortix/ui @kortix/sdk`, the same version of each (peers: `references/custom-dashboard.md`).
Module entries and `@kortix/ui/theme` need 0.14.4+. Inside `kortix-ai/CompanyOS`: `"workspace:*"`. Never copy component source.
## 1. Set up once
1. Styles. A Tailwind v4 host: `@import 'tailwindcss'; @import '@kortix/ui/tailwind.css';` in its main CSS, plus the optional peers `tw-animate-css`, `tailwind-scrollbar`, `tailwind-scrollbar-hide`. A host without Tailwind imports `@kortix/ui/styles.css` once: every class the package uses, none of yours.
2. Fonts. `@kortix/ui/fonts.css` (Roobert) is for Kortix-owned surfaces only. A white-label host never imports it.
3. Mount once at the root: `QueryClientProvider`, `UiProvider` (`link`, `navigation`: your router, `observesHistory: true` under Next.js; `components`: host slots, a missing slot hides its control; `config`: `managedModelsEnabled`, `connectorsEnabled`, `terminalEnabled`, `cliConnectEnabled`, `publicSharesEnabled`, `commandPaletteShortcut`, `settingsShortcut`, `accountApiEnabled`; `resolvePreviewUrl`; `useBrand`: your marks; `i18n`, `strings`, `image`, `useViewerId`: without it no sender name or "Stopped by" shows), `IconProvider` (`@kortix/ui/icon-provider`), one `` (`@kortix/ui/toast`). `setUiTelemetry` (`@kortix/ui`) once at module load. Dark mode is `dark` on ``. SDK `billingEnabled` stays off (Kortix's app only).
4. Ids, never route params. `SessionThread`, `SessionWorkspace` and `ProjectHome` mount `SessionIdsProvider` and the SDK workspace scope themselves. A block outside them: `KortixProjectProvider` (`@kortix/sdk/react`) and `SessionIdsProvider` (`projectId`, `sessionId`) around it. Links follow `setUiRoutes` (`@kortix/ui`): map each page you do not serve to `null`.
5. Import by subpath: `import { Modal } from '@kortix/ui/modal'`. The root `@kortix/ui` (section 7) needs no `@kortix/sdk`.
## 2. Compose before you create
| Job | Compose | Subpath |
| --------------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| Dialog or sheet | `Modal`, `ModalContent`, `ModalHeader`, `ModalTitle`, `ModalBody`, `ModalFooter` | `modal` |
| Destructive action | `ConfirmDialog` before the mutation, never a single click | `confirm-dialog` |
| Tooltip on an icon button | `Hint label="…"` | `hint` |
| Toast after a mutation | `successToast`, `errorToast`, `infoToast`, `warningToast`, `loadingToast` | `toast` |
| Status chip; count beside a label | `Badge size="sm"`; `CountBadge` (`waiting`, `reminder`, `conflict`, `neutral`) | `badge`, `count-badge` |
| Inline alert | `Alert` + `AlertTitle` + `AlertDescription` | `alert` |
| Pending spinner | `Loading` (default export) | `loading` |
| Expand and collapse | `Disclosure`, `DisclosureTrigger`, `DisclosureContent` | `disclosure` |
| Form field; search field | `Field`, `FieldLabel`, `FieldGroup`, `FieldDescription` with `Input`, `Textarea`, `Select`; `InputGroupSearch` | `field`, `input-group` |
| Panel; buttons side by side | `Card` and its slots, or `bg-popover rounded-md border px-4 py-5`; `ButtonGroup` | `card`, `button-group` |
| A selection, unsaved edits or a pending paste needs actions | `ActionBar` in an `ActionBarDock` at the bottom of the column; actions take `kbd`, `tone`, `emphasis` | `action-bar` |
| Tabs and filters | `Tabs`, `TabsList size="xs"`, `TabsTrigger` | `tabs` |
| Menu, picker, palette | `DropdownMenu`, `Popover`, `Command` | `dropdown-menu`, `popover`, `command` |
| Table and empty list | `Table`; `Empty` with one muted line | `table`, `empty` |
A new primitive is the last step: tokens only, a small API, and a section on `/design-system`.
## 3. Banned
| Never | Use |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `Dialog` / `DialogContent` in feature code | `Modal` |
| `Tooltip` primitives in feature code | `Hint` |
| `toast()` from `sonner`, `toast.success()` | the toast helpers and ``, all from `@kortix/ui/toast`; a host needs no `sonner` import |
| An icon with `animate-spin`, `CircleNotchIcon`, `SpinnerIcon` | `Loading` |
| A hand-rolled chip `` or a colored banner | `Badge`, `Alert` |
| `SectionCard`, `List` / `ListRow` | `Card`, `` rows |
| `lucide-react` or another icon set | `@phosphor-icons/react`, `*Icon` names, no `weight` prop (only `weight="fill"` for solid status glyphs) |
| A fork of a component, or `@base-ui/react`, `@radix-ui/*`, `cmdk`, `vaul` in a host | the component as it ships, themed with tokens (section 6); `asChild` on its parts, `Slot` from `@kortix/ui/slot` |
## 4. Tokens only
- Colors are semantic utilities (`bg-background`, `bg-card`, `bg-muted`, `text-muted-foreground`, `border-border`, `bg-primary`, `text-destructive`). Never a hex, `rgb()`, `oklch()` or a palette class (`text-emerald-600`).
- `--spacing` is `0.23rem`, 8% tighter than stock Tailwind: a 16px mockup gap is `gap-4`, never `gap-[16px]`.
- `rounded-md` for panels and fields; elevation only on overlays. Hover is `transition-colors duration-fast`; no motion over 300 ms.
## 5. Status tones
One meaning per hue. `StatusTone` (`@kortix/ui/status`): `success`, `warning`, `destructive`, `info`, `neutral`, for
`StatusBadge` and `STATUS_DOT`; `Badge` variants map the same, `muted` for neutral.
`Alert` accepts only `default`, `success`, `warning`, and `destructive`. Map info and neutral notices to `variant="default"`. Tinted icon tile:
`bg-kortix-green/15` (or `-orange`, `-blue`) with the icon in the full hue.
Example: `……` from `@kortix/ui/alert`. Never pass `title` to `Alert`: it is a native tooltip attribute, not visible content.
## 6. White-label
Theme with `@kortix/ui/theme`, never by forking a component: `themeToCss(theme)` in a `