UI & Styling
Design System Overview
Tailwind CSS 4 Setup
Tailwind CSS 4 uses the native Vite plugin (no PostCSS needed):
// vite.config.ts
import tailwindcss from '@tailwindcss/vite'
plugins: [react(), tailwindcss()]
/* styles/index.css */
@import "tailwindcss";
@import "./theme.css";
@import "./typography.css";
/* Cross-package source scanning */
@source "../../../../packages/ui/src/**/*.{js,ts,jsx,tsx}";
Utility function: cx() from @dtx/utils — combines clsx + tailwind-merge for safe class merging.
Color Palette
Brand Colors (Purple)
| Token | Value | Usage |
|---|---|---|
--color-brand-25 | Lightest purple | Subtle backgrounds |
--color-brand-50 | Hover states | |
--color-brand-100 | Active states | |
--color-brand-300 | Borders | |
--color-brand-500 | rgb(158 119 237) | Primary brand |
--color-brand-600 | Solid backgrounds | |
--color-brand-700 | Dark variant | |
--color-brand-950 | Deepest purple | Dark mode primary |
Semantic Colors
| Category | Tokens |
|---|---|
| Text | text-primary (900 gray), text-secondary (700), text-tertiary (600), text-disabled (400), text-brand-primary (purple), text-error-primary (red) |
| Background | bg-primary (white), bg-secondary (50 gray), bg-brand-solid (purple-600), bg-error-primary (red-50), bg-warning-primary (orange-50), bg-success-primary (green-50) |
| Border | border-primary (200 gray), border-brand (purple-300), border-error (red-300), border-disabled (300 gray) |
Extended Palette
Full 25–950 shade ramps for: Gray (9 variants), Error (red), Warning (orange), Success (green), Blue, Indigo, Violet, Purple, Pink, Rose, Orange, Yellow, Teal, Cyan
Typography
Font Families
| Token | Stack |
|---|---|
--font-body | Inter, system-ui, -apple-system, sans-serif |
--font-display | Inter, system-ui, -apple-system, sans-serif |
--font-mono | Roboto Mono, SFMono-Regular, Menlo, Monaco, monospace |
Type Scale
| Name | Size | Line Height | Usage |
|---|---|---|---|
| Display 2xl | 72px | 90px | Hero headings |
| Display xl | 60px | 72px | Major section heads |
| Display lg | 48px | 60px | Page titles |
| Display md | 36px | 44px | Section titles |
| Display sm | 30px | 38px | Card headings |
| Display xs | 24px | 32px | Sub-headings |
| Body xl | 20px | 30px | Large body text |
| Body lg | 18px | 28px | Prominent body |
| Body md | 16px | 24px | Default body |
| Body sm | 14px | 20px | Secondary text |
| Body xs | 12px | 18px | Captions, labels |
Spacing & Radius
Border Radius
| Token | Value | Usage |
|---|---|---|
--radius-xxs | 2px | Inline badges |
--radius-xs | 4px | Small elements |
--radius-sm | 6px | Inputs, small cards |
--radius-md | 8px | Cards, dropdowns |
--radius-lg | 10px | Modals |
--radius-xl | 12px | Large cards |
--radius-2xl | 16px | Feature cards |
--radius-full | 9999px | Avatars, pills |
Shadows
| Token | Usage |
|---|---|
--shadow-xs | Subtle inputs |
--shadow-sm | Cards, dropdowns |
--shadow-md | Elevated cards |
--shadow-lg | Modals |
--shadow-xl | Popovers |
--shadow-2xl | Page-level elevation |
--shadow-3xl | Full-screen overlays |
Icons
Library: @untitledui/icons 0.0.19 + @untitledui/file-icons 0.0.9
// Via @dtx/ui re-export
import { ArrowUp, Settings } from '@dtx/ui';
// Direct import
import { Home03, Users03, Dataflow03 } from '@untitledui/icons';
// Usage
<ArrowUp className="w-4 h-4" />
<Settings size={24} />
Commonly Used Icons
| Category | Icons |
|---|---|
| Navigation | Home03, BookOpen01, Settings01, LifeBuoy01 |
| Users | Users03, Users01, Shield01 |
| Data | Database01, Table, Link01, FolderCode, Cube01 |
| Pipeline | Dataflow03, Dataflow04, PenTool01 |
| Infrastructure | Server01, MessageCircle01, GitBranch01 |
| Actions | Plus, Edit01, Trash01, Copy01, RefreshCcw01, SearchLg |
| Status | CheckSquare, ClipboardList, Clock, Key01 |
| UI | ChevronSelectorVertical, HelpCircle, ArrowDown, BarChart03 |
Responsive Design
Approach: Desktop-first. The app is primarily designed for desktop use.
| Breakpoint | Width | Usage |
|---|---|---|
xxs | 320px | Mobile (minimal support) |
xs | 600px | Small tablet |
sm | 640px | Tailwind default |
md | 768px | Tailwind default |
lg | 1024px | Tailwind default |
xl | 1280px | Tailwind default — max container |
The sidebar collapses on smaller screens. Most complex UI (designers, data tables) requires desktop resolution.
Dark Mode
Status: Configured but not fully rolled out across all components.
Implementation: Class-based via .dark-mode CSS class:
@custom-variant dark (&:where(.dark-mode, .dark-mode *));
Usage in components:
<div className="bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100">
Monaco Editor: Dual themes — expression-light and expression-dark
No user-facing toggle is present in the current UI.
Animations
| Source | Usage |
|---|---|
| CSS (Tailwind) | animate-spin (loading), transition + duration-100 (interactions) |
| Custom keyframes | marquee (scrolling text, 60s), caret-blink (cursor, 1s) |
| Motion | Available in deps but minimal direct usage in portal |
Custom CSS Variants
| Variant | Selector | Purpose |
|---|---|---|
dark | .dark-mode | Dark mode styles |
label | [data-label] | Label attribute targeting |
focus-input-within | :has(input:focus) | Parent focus styles |
Global Resets
- Font smoothing (
-webkit-font-smoothing: antialiased) - Number input spinner removal
- Search input clear button removal
- Details/summary marker hiding
- Custom scrollbar hiding utility (
scrollbar-hide)