@atlas/ui#
React + Mantine + TanStack frontend package with modular blocks.
Architecture#
Each block lives at @atlas/ui/<block> and can be imported independently.
All exports are also available from @atlas/ui for convenience.
Blocks#
provider (@atlas/ui/provider)#
AtlasProvider— Root Mantine provider wrapper. Accepts optionaltheme.AppShell— Layout shell with optionalnavandheaderslots.
forms (@atlas/ui/forms)#
createForm<T>(config)— Returns a hook that providesformandhandleSubmit. Supports optional Zod schema validation.TextField— Text input bound to a form field.SelectField— Select input bound to a form field withoptions.SubmitButton— Submit button with optionalloadingstate.
table (@atlas/ui/table)#
TextColumn<T>(config)— Column definition for text values.DateColumn<T>(config)— Column definition that formats dates.ActionColumn<T>(config)— Column with edit/delete action buttons.createTable<T>(config)— Returns a component rendering a data table with optionalpaginationandsearch.
auth (@atlas/ui/auth)#
LoginPage— Email + password login form.SignupPage— Name + email + password signup form.ResetPasswordPage— Email-only password reset form. All acceptonSubmitreturning{ error?: string }and optionaltitle.
storage (@atlas/ui/storage)#
FileUpload— Hidden file input with button trigger and filename display.ImagePreview— Image display inside a bordered paper.
nav (@atlas/ui/nav)#
NavLink— Single navigation link with optional icon and active state.Sidebar— Vertical stack container for nav links.Breadcrumb— Breadcrumb trail from an array of{ label, href? }items.
cache (@atlas/ui/cache)#
CacheInspector— Table view of cache entries with invalidate/flush actions.CacheStatus— Badge showing connection status, entry count, and hit rate.
ai (@atlas/ui/ai)#
ChatWindow— Full chat interface with scrollable message list, auto-scroll, loading indicator, andPromptInputat the bottom. Props:messages,onSend,loading?,title?,placeholder?,height?.MessageBubble— Single message display with user (right-aligned) or assistant (left-aligned) styling and basic markdown rendering. Props:role,content,timestamp?.PromptInput— Textarea with send button. Enter to send, Shift+Enter for newline, loading/disabled states. Props:onSend,loading?,placeholder?,disabled?.AiSearch— Debounced semantic search input with results dropdown showing relevance scores. Props:onSearch,placeholder?,debounceMs?.GenerateButton— One-click AI content generation with loading state and Sparkles icon. Props:onGenerate,label?,onResult,variant?("button"|"icon").
Usage#
// Import specific block
import { AtlasProvider, AppShell } from "@atlas/ui/provider"
import { createTable, TextColumn } from "@atlas/ui/table"
// Or import everything
import { AtlasProvider, createTable, LoginPage } from "@atlas/ui"
Testing#
bun test packages/ui/
Icons#
lucide-react is available and used throughout blocks for consistent iconography:
- auth —
Mail,Lock,Usericons on form fields - storage —
Uploadon file button,ImageIconas placeholder - nav — Re-exports
Home,Users,Settings,FileText,LayoutDashboardfor convenience - cache —
Databasein title,Trash2on invalidate,RefreshCwon flush - table —
ChevronUp/ChevronDownfor sort indicators
When adding new blocks, prefer Lucide icons over unicode symbols or custom SVGs.
Dependencies#
@mantine/core,@mantine/hooks,@mantine/form(v7)@tanstack/react-table(v8)lucide-reactreact,react-dom(v19)