Components
Complete guide, color system tokens, import conventions, component module mappings, sub-component exports, underlying primitives, and prop APIs for @celestia-project/ui.
This document provides complete technical documentation and implementation details for @celestia-project/ui, including installation, color system tokens, import conventions, component module mappings, sub-component exports, underlying primitives, and prop APIs.
All components live in packages/ui/src/components and are imported via the @celestia-project/ui package alias. Every component is built on Base UI primitives, styled with Tailwind CSS, and supports the className prop for overrides. Icons come from @phosphor-icons/react.
Installation
The @celestia-project/ui package is already a workspace dependency. To add a new shadcn/ui component to the shared library:
pnpm dlx shadcn@latest add button -c apps/webColors
The design system uses two layers of Celestia color tokens: landing tokens (forced dark theme) and semantic tokens (light/dark theme support).
Landing Tokens
Brand Accent
Semantic Tokens
Chart Colors
Landing Tokens
These tokens are always dark and used exclusively on the landing page. They're defined in packages/ui/src/styles/globals.css.
| Token | Utility Class | Role | Value | Hex Approximation |
|---|---|---|---|---|
--bg | bg-bg | Page background | hsl(0 0% 4%) | #0a0a0a |
--surface | bg-surface | Cards, raised panels | hsl(0 0% 8%) | #141414 |
--text | text-text-primary | Headings, primary copy | hsl(0 0% 96%) | #f5f5f5 |
| (literal) | text-fog | Secondary/muted copy | hsl(0 0% 53%) | #878787 |
--stroke | border-stroke | Borders, dividers | hsl(0 0% 15%) | #262626 |
Brand Accent
The brand accent is tokenized — consume it with utilities, never with hex literals:
| Token | Utility | Value | Role |
|---|---|---|---|
--brand | bg-brand / text-brand / border-brand | hsl(0 72% 51%) ≈ #dc2626 | Accent, links, dots, hover borders |
--brand-deep | bg-brand-deep / text-brand-deep | hsl(350 78% 40%) ≈ #b51230 | Gradient end, pressed states |
--brand-foreground | text-brand-foreground | hsl(0 0% 100%) ≈ #ffffff | Text/icons on a --brand fill |
Gradient: linear-gradient(90deg, hsl(var(--brand)) 0%, hsl(var(--brand-deep)) 100%) — defined as the .accent-gradient class in apps/web/app/landing.css (landing-scoped, not part of the package styles).
Semantic Tokens
These tokens power the app-shell components (dashboard, forms, dialogs) and support both light and dark themes via the .dark class.
Light Theme (:root)
| Token | Utility Class | Role | Value |
|---|---|---|---|
--background | bg-background | Page background | oklch(1 0 0) (white) |
--foreground | text-foreground | Primary text | oklch(0.145 0 0) (near-black) |
--card | bg-card | Card backgrounds | oklch(1 0 0) (white) |
--card-foreground | text-card-foreground | Card text | oklch(0.145 0 0) (near-black) |
--primary | bg-primary | Primary buttons | oklch(0.55 0.22 27) (red) |
--primary-foreground | text-primary-foreground | Primary button text | oklch(0.985 0 0) (white) |
--secondary | bg-secondary | Secondary buttons | oklch(0.97 0 0) (light gray) |
--secondary-foreground | text-secondary-foreground | Secondary button text | oklch(0.205 0 0) (dark gray) |
--muted | bg-muted | Muted backgrounds | oklch(0.97 0 0) (light gray) |
--muted-foreground | text-muted-foreground | Muted text | oklch(0.54 0 0) (mid-gray) |
--accent | bg-accent | Accent backgrounds | oklch(0.97 0 0) (light gray) |
--accent-foreground | text-accent-foreground | Accent text | oklch(0.205 0 0) (dark gray) |
--destructive | bg-destructive | Error states | oklch(0.577 0.245 27.325) (red) |
--destructive-foreground | text-destructive-foreground | Text on a destructive fill | oklch(1 0 0) (white — 4.77:1 on #e7000b) |
--border | border-border | Borders | oklch(0.922 0 0) (light gray) |
--input | border-input | Input borders | oklch(0.922 0 0) (light gray) |
--ring | ring-ring | Focus rings | oklch(0.55 0.22 27) (red) |
--overlay | bg-overlay | Dialog/sheet scrim | oklch(0 0 0 / 70%) |
Dark Theme (.dark)
| Token | Utility Class | Role | Value |
|---|---|---|---|
--background | bg-background | Page background | oklch(0.145 0 0) (dark gray) |
--foreground | text-foreground | Primary text | oklch(0.985 0 0) (white) |
--card | bg-card | Card backgrounds | oklch(0.205 0 0) (dark gray) |
--card-foreground | text-card-foreground | Card text | oklch(0.985 0 0) (white) |
--primary | bg-primary | Primary buttons | oklch(0.68 0.22 27) (light red) |
--primary-foreground | text-primary-foreground | Primary button text | oklch(0.145 0 0) (near-black) |
--secondary | bg-secondary | Secondary buttons | oklch(0.269 0 0) (dark gray) |
--secondary-foreground | text-secondary-foreground | Secondary button text | oklch(0.985 0 0) (white) |
--muted | bg-muted | Muted backgrounds | oklch(0.269 0 0) (dark gray) |
--muted-foreground | text-muted-foreground | Muted text | oklch(0.708 0 0) (mid-gray) |
--accent | bg-accent | Accent backgrounds | oklch(0.269 0 0) (dark gray) |
--accent-foreground | text-accent-foreground | Accent text | oklch(0.985 0 0) (white) |
--destructive | bg-destructive | Error states | oklch(0.704 0.191 22.216) (red) |
--border | border-border | Borders | oklch(1 0 0 / 10%) (white with 10% opacity) |
--input | border-input | Input borders | oklch(1 0 0 / 15%) (white with 15% opacity) |
--ring | ring-ring | Focus rings | oklch(0.68 0.22 27) (light red) |
Chart Colors
Charts use a dedicated palette defined by --chart-1 through --chart-5 tokens. These are grayscale values that work in both light and dark themes.
| Token | Value |
|---|---|
--chart-1 | oklch(0.87 0 0) |
--chart-2 | oklch(0.556 0 0) |
--chart-3 | oklch(0.439 0 0) |
--chart-4 | oklch(0.371 0 0) |
--chart-5 | oklch(0.269 0 0) |
Import Conventions
The @celestia-project/ui library supports both barrel imports and deep imports.
1. Styles & CSS Variables
Choose the integration method based on whether the consuming project already configures Tailwind CSS v4:
Option A: Quickstart (Standalone or new apps)
Import the global stylesheet once in your top-level application file (app/layout.tsx or pages/_app.tsx / main.tsx):
import "@celestia-project/ui/globals.css"This stylesheet injects Tailwind CSS v4, tw-animate-css, shadcn base styles, and oklch theme variables (light + dark mode).
Option B: Existing Tailwind v4 Apps (@source directive)
In existing Tailwind v4 applications that define their own CSS variables, color palettes, or @theme blocks, do not import @celestia-project/ui/globals.css directly. Doing so can cause duplicate utility injection or overwrite app-level theme variables.
Instead, add the @source directive in your project's main stylesheet (e.g. src/styles/globals.css):
@import "tailwindcss";
/* 1. Instruct Tailwind to scan the UI package for used class names */@source "../../node_modules/@celestia-project/ui";@source "../**";
@custom-variant dark (&:is(.dark *));
/* 2. Map shadcn & Celestia design tokens to Tailwind theme utilities */@theme inline { --color-background: var(--background); --color-foreground: var(--foreground); --color-card: var(--card); --color-card-foreground: var(--card-foreground); --color-popover: var(--popover); --color-popover-foreground: var(--popover-foreground); --color-primary: var(--primary); --color-primary-foreground: var(--primary-foreground); --color-secondary: var(--secondary); --color-secondary-foreground: var(--secondary-foreground); --color-muted: var(--muted); --color-muted-foreground: var(--muted-foreground); --color-accent: var(--accent); --color-accent-foreground: var(--accent-foreground); --color-destructive: var(--destructive); --color-destructive-foreground: var(--destructive-foreground); --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring);
--radius-sm: calc(var(--radius) - 4px); --radius-md: calc(var(--radius) - 2px); --radius-lg: var(--radius); --radius-xl: calc(var(--radius) + 4px); --radius-2xl: calc(var(--radius) * 1.8); --radius-3xl: calc(var(--radius) * 2.2); --radius-4xl: calc(var(--radius) * 2.6);
/* Celestia UI tokens & motion */ --color-bg: hsl(var(--bg, 0 0% 4%)); --color-surface: hsl(var(--surface, 0 0% 8%)); --color-text-primary: hsl(var(--text, 0 0% 96%)); --color-fog: hsl(0 0% 53%); --color-stroke: hsl(var(--stroke, 0 0% 15%));
--ease-out: cubic-bezier(0.23, 1, 0.32, 1); --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
--animate-scroll-down: scroll-down 1.5s ease-in-out infinite; --animate-role-fade-in: role-fade-in 0.4s cubic-bezier(0.23, 1, 0.32, 1) both; --animate-gradient-shift: gradient-shift 6s ease infinite;
@keyframes scroll-down { 0% { transform: translateY(-100%); } 100% { transform: translateY(200%); } }
@keyframes role-fade-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes gradient-shift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }}2. Barrel Imports (Recommended)
Barrel imports pull from the package root. All components are tree-shakeable in modern bundlers (Next.js, Vite).
import { Button, Card, CardHeader, CardTitle, CardContent, Dialog, DialogTrigger, DialogContent, cn} from "@celestia-project/ui"Note on Toast Collisions: Both Base UI Toast and Sonner provide toaster components. In the root barrel export:
- Base UI
Toast/Toasteris exported asToast/Toaster.- Sonner
Toasteris exported asSonnerToaster.
3. Deep Imports
For strict bundle-size optimizations or non-bundler environments, import directly from the module paths:
import { Button } from "@celestia-project/ui/primitive/button"import { Card, CardHeader, CardTitle, CardContent } from "@celestia-project/ui/primitive/card"import { Dialog, DialogContent, DialogTrigger } from "@celestia-project/ui/primitive/dialog"import { useIsMobile } from "@celestia-project/ui/hooks/use-mobile"import { cn } from "@celestia-project/ui/lib/utils"4. Utilities & Hooks
| Export Name | Import Specifier | Description |
|---|---|---|
cn | @celestia-project/ui/lib/utils or barrel | clsx + tailwind-merge class name helper |
useIsMobile | @celestia-project/ui/hooks/use-mobile or barrel | Custom React hook returning boolean for < 768px viewport |
SonnerToaster | @celestia-project/ui (barrel) | Re-exported Sonner Toaster |
toast | @celestia-project/ui/primitive/sonner | Sonner toast trigger function |
Component Mapping Reference
Below is the complete mapping of every component module — 153 files across primitive/, composite/ and ai/ in packages/ui/src/components/, plus the 32 page templates shipped as copy sources under apps/web/components/layout-templates/ — listing their deep import specifiers, exported sub-components, and underlying base primitives.
Layout & Structure
The layout family is the page-level layer — 36 members: four slot-only shells (package composites) and 32 page templates shipped as copy sources under apps/web/components/layout-templates/, grouped below. The shells own the frame (centred/split for auth, rail + header + content for the signed-in app, a full-viewport frame for status screens, and a nav + footer frame for public pages), and thin page components supply their own fields and defaults on top of a shell.
| Group | Members | Sits in |
|---|---|---|
| Shells & auth | AuthShell, MarketingShell, PageShell, DashboardShell, the auth screens | Its own chrome |
| Screens | DashboardPage, ProfilePage, SettingsPage, ListPage, BillingPage, StatusPage + not-found/error | PageShell / DashboardShell |
| Marketing & content | LandingPage, PricingPage, BlogIndexPage, ArticlePage | MarketingShell |
| Collaboration | InboxPage, ChatPage, KanbanPage, CalendarPage, FilesPage | PageShell |
| Data & insights | AnalyticsPage, ReportsPage, RecordDetailPage, SearchPage, AuditLogPage | PageShell / DashboardPage |
| Commerce & flows | CheckoutPage, InvoicePage, OnboardingPage, TeamPage, IntegrationsPage | PageShell |
Two rules hold across the whole family. A page that sits inside a shell never draws its own chrome — LandingPage renders the hero and the content bands and expects MarketingShell around it, and every *Page on PageShell inherits the blurred sticky header rather than repeating it. A page that owns a document shape instead sets its own height: InvoicePage and ReportsPage are natural-height, because a document that flexes to fill the viewport pushes its totals block up under an overflowing table and the two paint on top of each other.
State is split deliberately. Anything that belongs in the URL — SearchPage's query and facets, BlogIndexPage's category, InboxPage's selected message — is controlled and passed in. Anything purely internal — PricingPage's billing toggle, OnboardingPage's step, IntegrationsPage's connection state — is uncontrolled and owned by the component. That way a consumer never has to mirror state they do not route on.
The page templates are documented as a family in Templates. Unlike the primitives, they ship as copy templates — plain source files under apps/web/components/layout-templates/ rather than package exports; the four slot-only shells they compose on (AuthShell, PageShell, DashboardShell, MarketingShell) are package composites. Preview any of them at /layout and copy the source straight into an app.
| Module | Deep Import | Exported Sub-Components | Base Primitive |
|---|---|---|---|
analytics-page | apps/web/components/layout-templates/analytics-page.tsx | AnalyticsPage, AnalyticsBreakdownRow | DashboardPage + Card + Progress |
article-page | apps/web/components/layout-templates/article-page.tsx | ArticlePage, ArticleTocItem, ArticleAuthor, RelatedArticle | Custom HTML + Avatar + Badge + Separator |
aspect-ratio | @celestia-project/ui/primitive/aspect-ratio | AspectRatio | Radix AspectRatio |
audit-log-page | apps/web/components/layout-templates/audit-log-page.tsx | AuditLogPage, AuditEvent, AuditTone | PageShell + Custom HTML |
auth-shell | @celestia-project/ui/composite/auth-shell | AuthShell | Custom HTML |
billing-page | apps/web/components/layout-templates/billing-page.tsx | BillingPage, BillingPlan, BillingUsage, BillingInvoice | PageShell + Card + Progress + Table |
blog-index-page | apps/web/components/layout-templates/blog-index-page.tsx | BlogIndexPage, BlogPost | Custom HTML + Badge |
calendar-page | apps/web/components/layout-templates/calendar-page.tsx | CalendarPage, CalendarDay, CalendarEvent, CalendarAgendaItem, CalendarTone | PageShell + Custom HTML |
card | @celestia-project/ui/primitive/card | Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter | Custom HTML |
chat-page | apps/web/components/layout-templates/chat-page.tsx | ChatPage, ChatChannel, ChatThreadMessage, ChatMember | Custom HTML + Avatar |
checkout-page | apps/web/components/layout-templates/checkout-page.tsx | CheckoutPage, CheckoutStep, CheckoutSummaryRow | PageShell + Button |
dashboard-page | apps/web/components/layout-templates/dashboard-page.tsx | DashboardPage | PageShell + Card |
dashboard-shell | @celestia-project/ui/composite/dashboard-shell | DashboardShell | Custom HTML |
error-page | apps/web/components/layout-templates/error-page.tsx | ErrorPage | StatusPage |
files-page | apps/web/components/layout-templates/files-page.tsx | FilesPage, FileEntry | PageShell + Table + Badge |
forgot-password-page | apps/web/components/layout-templates/forgot-password-page.tsx | ForgotPasswordPage | AuthShell |
inbox-page | apps/web/components/layout-templates/inbox-page.tsx | InboxPage, InboxFolder, InboxMessage | Custom HTML |
integrations-page | apps/web/components/layout-templates/integrations-page.tsx | IntegrationsPage, Integration | PageShell + Switch |
invoice-page | apps/web/components/layout-templates/invoice-page.tsx | InvoicePage, InvoiceParty, InvoiceLineItem, InvoiceTotal | PageShell + Table |
kanban-page | apps/web/components/layout-templates/kanban-page.tsx | KanbanPage, KanbanColumn, KanbanCard, BoardTone | PageShell + Badge |
landing-page | apps/web/components/layout-templates/landing-page.tsx | LandingPage, LandingFeature, LandingMetric | Custom HTML |
list-page | apps/web/components/layout-templates/list-page.tsx | ListPage, ListColumn | PageShell + Table |
marketing-shell | @celestia-project/ui/composite/marketing-shell | MarketingShell | Custom HTML |
not-found-page | apps/web/components/layout-templates/not-found-page.tsx | NotFoundPage | StatusPage |
onboarding-page | apps/web/components/layout-templates/onboarding-page.tsx | OnboardingPage, OnboardingStep | PageShell + Custom HTML |
page-shell | @celestia-project/ui/composite/page-shell | PageShell | Custom HTML |
pricing-page | apps/web/components/layout-templates/pricing-page.tsx | PricingPage, PricingPlan | Custom HTML + Badge |
profile-page | apps/web/components/layout-templates/profile-page.tsx | ProfilePage | Base UI Tabs + Avatar |
record-detail-page | apps/web/components/layout-templates/record-detail-page.tsx | RecordDetailPage, RecordDetailTab, RecordDetailMeta | PageShell + Tabs + Avatar |
reports-page | apps/web/components/layout-templates/reports-page.tsx | ReportsPage, ReportEntry, ReportStatus | PageShell + Badge + Button |
reset-password-page | apps/web/components/layout-templates/reset-password-page.tsx | ResetPasswordPage | AuthShell |
resizable | @celestia-project/ui/primitive/resizable | Resizable, ResizablePanel, ResizablePanelGroup, ResizableHandle | react-resizable-panels |
search-page | apps/web/components/layout-templates/search-page.tsx | SearchPage, SearchFacet, SearchFacetOption, SearchResult | PageShell + Checkbox + Input |
separator | @celestia-project/ui/primitive/separator | Separator | Base UI Separator |
settings-page | apps/web/components/layout-templates/settings-page.tsx | SettingsPage | Custom HTML |
sidebar | @celestia-project/ui/composite/sidebar | SidebarProvider, Sidebar, SidebarHeader, SidebarContent, SidebarGroup, SidebarGroupLabel, SidebarGroupAction, SidebarGroupContent, SidebarFooter, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarMenuAction, SidebarMenuSub, SidebarMenuSubItem, SidebarMenuSubButton, SidebarMenuBadge, SidebarMenuSkeleton, SidebarRail, SidebarSeparator, SidebarTrigger, SidebarInset, SidebarInput, useSidebar | Custom + Base UI Tooltip & Sheet |
sign-in-page | apps/web/components/layout-templates/sign-in-page.tsx | SignInPage, SocialProvider | AuthShell |
sign-up-page | apps/web/components/layout-templates/sign-up-page.tsx | SignUpPage | AuthShell |
status-page | apps/web/components/layout-templates/status-page.tsx | StatusPage | Custom HTML |
team-page | apps/web/components/layout-templates/team-page.tsx | TeamPage, TeamMember, TeamMemberStatus | PageShell + Avatar + Badge |
two-factor-page | apps/web/components/layout-templates/two-factor-page.tsx | TwoFactorPage | AuthShell + input-otp |
Shells vs. pages
| Component | Frame it owns | Use it when |
|---|---|---|
AuthShell | Centred card or split screen, logo, heading, provider aside, footer | Building a bespoke signed-out screen |
MarketingShell | Announcement strip, nav bar (logo / nav / actions, optionally stickyNav), page body, footer band | Any public page — the hero is the title, so there is no title block to inherit |
PageShell | Blurred sticky header, title / description / actions, width presets | Any in-app page that is not a dashboard or profile |
DashboardShell | Navigation rail (brand, nav, navFooter), sticky header, content column, optional aside | The route-group layout of a signed-in app |
DashboardPage | PageShell + metric tile grid, loading skeletons, empty slot, secondary column | A dashboard overview |
ProfilePage | Banner, overlapping avatar, identity block, meta / stats rows, line-variant tab bar | A user profile screen |
SettingsPage | Section navigation beside stacked panels | Account or workspace settings |
ListPage | PageShell + toolbar (search / filters / toolbar), selection with select-all, loading skeletons, empty state, pagination | A table-driven index or CRUD list screen |
BillingPage | PageShell + plan card, usage meters, payment method, invoice table | Plan, usage and invoice history |
StatusPage | Full-viewport centred frame: status code or icon, title, description, optional monospace detail, two actions | Any bespoke not-the-page-you-asked-for state (403, 503, maintenance) |
NotFoundPage | StatusPage with 404 defaults | A missing route |
ErrorPage | StatusPage with 500 defaults plus a detail block | An unexpected server failure |
DashboardShell is deliberately slot-based rather than opinionated about navigation — nav takes whatever list the consumer already has, so it can back an existing route group without rewriting its navigation. SettingsPage keeps every panel mounted and hides the inactive ones, so unsaved input survives a section switch.
ListPage owns layout and selection state but never filters, sorts or paginates rows — that stays with whoever owns the data, so there is only ever one source of truth for what a given page contains. BillingPage follows the same rule for money: it renders the figures you pass and never derives a prorated amount or a renewal date, because being subtly wrong about a charge is worse than not showing it.
Typography & Display
| Module | Deep Import | Exported Sub-Components | Base Primitive |
|---|---|---|---|
alert | @celestia-project/ui/primitive/alert | Alert, AlertTitle, AlertDescription | Custom HTML |
article-card | @celestia-project/ui/composite/article-card | ArticleCard | Custom HTML |
badge | @celestia-project/ui/primitive/badge | Badge, badgeVariants | Base UI useRender |
breadcrumb | @celestia-project/ui/primitive/breadcrumb | Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis | Custom HTML |
empty | @celestia-project/ui/composite/empty | Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyActions, EmptyMedia | Custom HTML |
item | @celestia-project/ui/primitive/item | Item, ItemGroup, ItemHeader, ItemFooter, ItemTitle, ItemDescription, ItemMedia, ItemActions, ItemContent | Base UI useRender |
kbd | @celestia-project/ui/primitive/kbd | Kbd | Custom HTML |
marker | @celestia-project/ui/composite/marker | Marker | Custom HTML |
message | @celestia-project/ui/composite/message | Message, MessageBubble | Custom HTML |
skeleton | @celestia-project/ui/primitive/skeleton | Skeleton | Custom HTML |
table | @celestia-project/ui/primitive/table | Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption | Custom HTML |
Forms & Inputs
| Module | Deep Import | Exported Sub-Components | Base Primitive |
|---|---|---|---|
button | @celestia-project/ui/primitive/button | Button, buttonVariants | Base UI Button |
button-group | @celestia-project/ui/composite/button-group | ButtonGroup, ButtonGroupText | Custom HTML |
toolbar-menu | @celestia-project/ui/composite/toolbar-menu | ToolbarMenu, ToolbarMenuItem, ToolbarMenuSeparator | Custom HTML |
checkbox | @celestia-project/ui/primitive/checkbox | Checkbox | Base UI Checkbox |
combobox | @celestia-project/ui/composite/combobox | Combobox, ComboboxInput, ComboboxContent, ComboboxList, ComboboxItem, ComboboxEmpty, ComboboxGroup, ComboboxLabel | Base UI Combobox |
field | @celestia-project/ui/composite/field | Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator | Base UI Field |
filter | @celestia-project/ui/composite/filter | FilterBar, FilterChip, FilterMenu, FilterToken, FilterClear | Custom HTML + Popover |
form | @celestia-project/ui/composite/form | Form, FormField, FormItem, FormLabel, FormControl, FormDescription, FormMessage, useFormField | react-hook-form |
input | @celestia-project/ui/primitive/input | Input | Custom HTML |
input-group | @celestia-project/ui/composite/input-group | InputGroup, InputGroupAddon, InputGroupInput | Custom HTML |
input-otp | @celestia-project/ui/primitive/input-otp | InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator | input-otp |
label | @celestia-project/ui/primitive/label | Label | Custom HTML |
native-select | @celestia-project/ui/composite/native-select | NativeSelect, NativeSelectOptGroup, NativeSelectOption | Custom HTML |
radio-group | @celestia-project/ui/primitive/radio-group | RadioGroup, RadioGroupItem | Base UI RadioGroup |
select | @celestia-project/ui/primitive/select | Select, SelectTrigger, SelectValue, SelectContent, SelectItem, SelectGroup, SelectLabel, SelectSeparator | Base UI Select |
select-env-input | @celestia-project/ui/composite/select-env-input | ColorizedUrlInput | Custom HTML + Popover |
slider | @celestia-project/ui/primitive/slider | Slider | Base UI Slider |
switch | @celestia-project/ui/primitive/switch | Switch | Base UI Switch |
textarea | @celestia-project/ui/primitive/textarea | Textarea | Custom HTML |
toggle | @celestia-project/ui/primitive/toggle | Toggle, toggleVariants | Base UI Toggle |
toggle-group | @celestia-project/ui/composite/toggle-group | ToggleGroup, ToggleGroupItem | Base UI ToggleGroup |
Overlays & Popups
| Module | Deep Import | Exported Sub-Components | Base Primitive |
|---|---|---|---|
alert-dialog | @celestia-project/ui/composite/alert-dialog | AlertDialog, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, AlertDialogClose | Base UI AlertDialog |
context-menu | @celestia-project/ui/primitive/context-menu | ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuSub, ContextMenuSubTrigger, ContextMenuSubContent | Base UI ContextMenu |
dialog | @celestia-project/ui/primitive/dialog | Dialog, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, DialogClose | Base UI Dialog |
bottom-sheet | @celestia-project/ui/primitive/bottom-sheet | BottomSheet, BottomSheetTrigger, BottomSheetContent, BottomSheetHeader, BottomSheetBody, BottomSheetFooter, BottomSheetTitle, BottomSheetDescription, BottomSheetClose | Base UI Drawer (via Drawer) |
drawer | @celestia-project/ui/primitive/drawer | Drawer, DrawerTrigger, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, DrawerClose | Base UI Drawer |
dropdown-menu | @celestia-project/ui/primitive/dropdown-menu | DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent | Base UI DropdownMenu |
hover-card | @celestia-project/ui/primitive/hover-card | HoverCard, HoverCardTrigger, HoverCardContent | Base UI HoverCard |
popover | @celestia-project/ui/primitive/popover | Popover, PopoverTrigger, PopoverContent | Base UI Popover |
sheet | @celestia-project/ui/primitive/sheet | Sheet, SheetTrigger, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, SheetClose | Base UI Dialog |
tooltip | @celestia-project/ui/primitive/tooltip | TooltipProvider, Tooltip, TooltipTrigger, TooltipContent | Base UI Tooltip |
Navigation
| Module | Deep Import | Exported Sub-Components | Base Primitive |
|---|---|---|---|
menu | @celestia-project/ui/composite/menu | Menu, MenuTrigger, MenuContent, MenuItem, MenuGroup, MenuSeparator, MenuCheckboxItem, MenuRadioItem | Base UI Menu |
menubar | @celestia-project/ui/primitive/menubar | Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarSub, MenubarSubTrigger, MenubarSubContent | Base UI Menubar |
navigation-menu | @celestia-project/ui/primitive/navigation-menu | NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuTrigger, NavigationMenuContent, NavigationMenuLink | Radix NavigationMenu |
pagination | @celestia-project/ui/composite/pagination | Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis | Custom HTML |
tabs | @celestia-project/ui/primitive/tabs | Tabs, TabsList, TabsTrigger, TabsContent | Base UI Tabs |
tab-bar | @celestia-project/ui/composite/tab-bar | TabBar, TabBarItem | Custom HTML + Phosphor Icon |
Data & Media
| Module | Deep Import | Exported Sub-Components | Base Primitive |
|---|---|---|---|
avatar | @celestia-project/ui/primitive/avatar | Avatar, AvatarImage, AvatarFallback | Base UI Avatar |
calendar | @celestia-project/ui/primitive/calendar | Calendar | react-day-picker |
carousel | @celestia-project/ui/primitive/carousel | Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext | embla-carousel-react |
chart | @celestia-project/ui/composite/chart | ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle | Recharts wrapper |
chart-area | @celestia-project/ui/composite/chart-area | ChartArea | Recharts + ChartContainer |
chart-bar | @celestia-project/ui/composite/chart-bar | ChartBar | Recharts + ChartContainer |
chart-line | @celestia-project/ui/composite/chart-line | ChartLine | Recharts + ChartContainer |
chart-pie | @celestia-project/ui/composite/chart-pie | ChartPie | Recharts + ChartContainer |
chart-radar | @celestia-project/ui/composite/chart-radar | ChartRadar | Recharts + ChartContainer |
chart-radial | @celestia-project/ui/composite/chart-radial | ChartRadial | Recharts + ChartContainer |
chart-sparkline | @celestia-project/ui/composite/chart-sparkline | ChartSparkline | Recharts |
data-table | @celestia-project/ui/composite/data-table | DataTable | @tanstack/react-table + Table |
progress | @celestia-project/ui/primitive/progress | Progress | Base UI Progress |
scroll-area | @celestia-project/ui/primitive/scroll-area | ScrollArea, ScrollBar | Radix ScrollArea |
Content & Block Editor
Two editors ship in the composite family: a Monaco-backed source editor and the block-based text editor used by the CMS features — a compound component whose sections, drag helpers, and formatter live in one module directory.
| Module | Deep Import | Exported Sub-Components | Base Primitive |
|---|---|---|---|
block-text-editor | @celestia-project/ui/composite/block-text-editor | BlockTextEditor, BlockSectionRenderer, ParagraphSection, HeadingSection, ListSection, TaskListSection, CodeSection, QuoteSection, ImageSection, plus block icons, drag pills, and add-section helpers | Custom HTML |
text-editor | @celestia-project/ui/composite/text-editor | TextEditor | @monaco-editor/react |
AI & Chat Development (@celestia-project/ui/ai & @celestia-project/ui)
Comprehensive suite of 54 AI development primitives, interactive elements, streaming displays, and agent tools.
| Module | Deep Import | Exported Sub-Components | Purpose |
|---|---|---|---|
agent | @celestia-project/ui/components/ai/agent | Agent, AgentHeader, AgentTools, AgentOutput | Visual AI agent profile with registered tool manifests |
artifact | @celestia-project/ui/components/ai/artifact | Artifact, ArtifactHeader, ArtifactContent, ArtifactAction, ArtifactActions, ArtifactClose, ArtifactTitle, ArtifactDescription | Sidecar artifact container for generated documents, websites, and code |
attachment | @celestia-project/ui/components/ai/attachment | Attachment, AttachmentGroup, AttachmentMedia, AttachmentContent, AttachmentTitle, AttachmentDescription, AttachmentActions, AttachmentAction | Single upload item badge with progress state indicators |
attachments | @celestia-project/ui/components/ai/attachments | Attachments, AttachmentItem, AttachmentPreview, AttachmentRemove, AttachmentEmpty, AttachmentHoverCard, AttachmentHoverCardTrigger, AttachmentHoverCardContent | Multi-file attachment carousel and thumbnail hover preview grid |
audio-player | @celestia-project/ui/components/ai/audio-player | AudioPlayer, AudioPlayerElement, AudioPlayerControlBar, AudioPlayerPlayButton, AudioPlayerSeekBackwardButton, AudioPlayerSeekForwardButton, AudioPlayerTimeDisplay, AudioPlayerTimeRange, AudioPlayerDurationDisplay, AudioPlayerMuteButton, AudioPlayerVolumeRange | AI speech and voice synthesis audio playback controller powered by MediaChrome |
bubble | @celestia-project/ui/components/ai/bubble | Bubble, BubbleGroup, BubbleContent, BubbleReactions | Chat message speech bubble with customizable alignments, variants, and reactions |
canvas | @celestia-project/ui/components/ai/canvas | Canvas | Infinite canvas surface for AI workflow visual graphs |
chain-of-thought | @celestia-project/ui/components/ai/chain-of-thought | ChainOfThought, ChainOfThoughtStep, ChainOfThoughtOutput | Step-by-step reasoning step timeline |
chat-input | @celestia-project/ui/components/ai/chat-input | ChatInput | Multi-line text input field tailored for conversational prompt entry |
chat-message-area | @celestia-project/ui/components/ai/chat-message-area | ChatMessageArea | Scrollable message container layout with automatic bubble stacking |
chat-message | @celestia-project/ui/components/ai/chat-message | ChatMessage | Role-based message container (user vs assistant) with distinct styling |
checkpoint | @celestia-project/ui/components/ai/checkpoint | Checkpoint, CheckpointTrigger, CheckpointContent, CheckpointRestore, CheckpointBadge | Checkpoint and snapshot version tracker for iterative AI generations |
code-block | @celestia-project/ui/components/ai/code-block | CodeBlock, CodeBlockHeader, CodeBlockTitle, CodeBlockCopyButton, CodeBlockLanguageSelect | Syntax-highlighted code container powered by Shiki with copy button and language selector |
commit | @celestia-project/ui/components/ai/commit | Commit, CommitHeader, CommitContent, CommitDiff | Git commit and code modification diff viewer for AI code generators |
confirmation | @celestia-project/ui/components/ai/confirmation | Confirmation, ConfirmationTitle, ConfirmationRequest, ConfirmationAccepted, ConfirmationRejected, ConfirmationActions, ConfirmationAction | Human-in-the-loop tool execution approval alert dialog |
connection | @celestia-project/ui/components/ai/connection | Connection | Node connection routing line for AI graph workflows |
context | @celestia-project/ui/components/ai/context | Context, ContextTrigger, ContextContent, ContextTokens, ContextCacheUsage | LLM context window token counter and cache utilization monitor |
controls | @celestia-project/ui/components/ai/controls | Controls, ControlItem | Zoom, pan, and fit-to-view navigation controls for canvas workflows |
conversation | @celestia-project/ui/components/ai/conversation | Conversation, ConversationContent, ConversationEmptyState, ConversationScrollToBottom | Pinned auto-scrolling chat stream container with stick-to-bottom behavior |
edge | @celestia-project/ui/components/ai/edge | Edge | Visual graph edge connector between workflow nodes |
environment-variables | @celestia-project/ui/components/ai/environment-variables | EnvironmentVariables, EnvironmentVariablesHeader, EnvironmentVariablesContent | Key-value environment variable editor for AI tool sandboxes |
file-tree | @celestia-project/ui/components/ai/file-tree | FileTree, FileTreeFolder, FileTreeFile | Interactive workspace file tree hierarchy viewer |
image | @celestia-project/ui/components/ai/image | ImageZoom, ImagePreview | AI generated image viewer with lightbox magnification and metadata |
inline-citation | @celestia-project/ui/components/ai/inline-citation | InlineCitation, InlineCitationCard, InlineCitationSource | Per-sentence footnote popover linking directly to source citations |
jsx-preview | @celestia-project/ui/components/ai/jsx-preview | JSXPreview | Safe JSX string sandbox renderer for live AI UI generation |
message-scroller | @celestia-project/ui/components/ai/message-scroller | MessageScroller | Auto-scrolling viewport maintaining scroll anchor during real-time streaming |
message | @celestia-project/ui/components/ai/message | AiMessage, AiMessageContent, MessageActions, MessageAction, MessageBranch, MessageBranchContent, MessageBranchSelector, MessageBranchPrevious, MessageBranchNext, MessageBranchPage, MessageResponse, MessageToolbar | Markdown-rendered message item with multi-branch switching and response actions |
mic-selector | @celestia-project/ui/components/ai/mic-selector | MicSelector, MicSelectorTrigger, MicSelectorContent | Input microphone device selector dropdown |
model-selector | @celestia-project/ui/components/ai/model-selector | ModelSelector, ModelSelectorTrigger, ModelSelectorContent, ModelSelectorInput, ModelSelectorList, ModelSelectorEmpty, ModelSelectorGroup, ModelSelectorItem, ModelSelectorShortcut, ModelSelectorSeparator, ModelSelectorLogo, ModelSelectorLogoGroup, ModelSelectorName | LLM model switcher with provider logos, shortcuts, and context metadata |
node | @celestia-project/ui/components/ai/node | Node, NodeHeader, NodeContent, NodeAction | Interactive workflow canvas node card |
open-in-chat | @celestia-project/ui/components/ai/open-in-chat | OpenInChat, OpenInTrigger, OpenInChatGPT, OpenInClaude | Quick-launch external query in ChatGPT, Claude, or Perplexity |
package-info | @celestia-project/ui/components/ai/package-info | PackageInfo, PackageInfoHeader, PackageInfoContent | Package manifest and npm dependency analyzer |
panel | @celestia-project/ui/components/ai/panel | Panel, PanelHeader, PanelContent | Floating sidecar tool panel on infinite canvases |
persona | @celestia-project/ui/components/ai/persona | Persona, PersonaAvatar, PersonaName, PersonaRole | AI assistant persona profile badge and role indicator |
plan | @celestia-project/ui/components/ai/plan | Plan, PlanHeader, PlanTitle, PlanDescription, PlanAction, PlanContent, PlanFooter, PlanTrigger | Collapsible multi-step plan breakdown with live streaming shimmer |
prompt-input | @celestia-project/ui/components/ai/prompt-input | PromptInput, PromptInputTextarea, PromptInputHeader, PromptInputFooter, PromptInputTools, PromptInputButton, PromptInputSubmit, PromptInputActionMenu, PromptInputSelect | Rich AI prompt bar with multi-line expand, file upload dropzone, command autocomplete, and status controls |
queue | @celestia-project/ui/components/ai/queue | Queue, QueueHeader, QueueItem, QueueContent | Background job execution and generation queue monitor |
reasoning | @celestia-project/ui/components/ai/reasoning | Reasoning, ReasoningTrigger, ReasoningContent | Collapsible streaming chain-of-thought and model reasoning display with timer |
sandbox | @celestia-project/ui/components/ai/sandbox | Sandbox, SandboxHeader, SandboxContent, SandboxRunButton | Live code execution sandbox with output viewer |
schema-display | @celestia-project/ui/components/ai/schema-display | SchemaDisplay | Interactive JSON Schema explorer and validator |
shimmer | @celestia-project/ui/components/ai/shimmer | Shimmer | Text skeleton shimmer animation effect during streaming generation |
snippet | @celestia-project/ui/components/ai/snippet | Snippet, SnippetHeader, SnippetContent, SnippetCopyButton | Compact code snippet preview and one-click copy card |
sources | @celestia-project/ui/components/ai/sources | Sources, SourcesTrigger, SourcesContent, Source | Collapsible RAG source references panel with external links |
speech-input | @celestia-project/ui/components/ai/speech-input | SpeechInput | Speech-to-text voice input controller and audio visualizer |
stack-trace | @celestia-project/ui/components/ai/stack-trace | StackTrace, StackTraceHeader, StackTraceFrames | Formatted error stack trace analyzer and frame inspector |
suggestion | @celestia-project/ui/components/ai/suggestion | Suggestions, Suggestion | Horizontal scrollable prompt suggestions and quick action pills |
task | @celestia-project/ui/components/ai/task | Task, TaskTrigger, TaskContent, TaskItem, TaskItemFile | Multi-step agent task progress display with status icons |
terminal | @celestia-project/ui/components/ai/terminal | Terminal, TerminalHeader, TerminalContent | Simulated terminal command executor and CLI output stream |
test-results | @celestia-project/ui/components/ai/test-results | TestResults, TestResultSummary, TestResultList | Test suite execution breakdown with pass/fail counts |
tool | @celestia-project/ui/components/ai/tool | Tool, ToolHeader, ToolContent, ToolInput, ToolOutput | Agent tool call inspection and execution viewer with status badges |
toolbar | @celestia-project/ui/components/ai/toolbar | Toolbar, ToolbarButton, ToolbarSeparator, ToolbarGroup | Floating AI action toolbar for canvas and text selections |
transcription | @celestia-project/ui/components/ai/transcription | Transcription, TranscriptionSegment | Audio transcription synchronized viewer |
voice-selector | @celestia-project/ui/components/ai/voice-selector | VoiceSelector, VoiceSelectorTrigger, VoiceSelectorContent, VoiceSelectorList | Voice selection dialog with audio previews and gender badges |
web-preview | @celestia-project/ui/components/ai/web-preview | WebPreview, WebPreviewNavigation, WebPreviewAddressBar | Responsive viewport browser frame for previewing generated web pages |
Feedback & Utilities
| Module | Deep Import | Exported Sub-Components | Base Primitive |
|---|---|---|---|
accordion | @celestia-project/ui/primitive/accordion | Accordion, AccordionItem, AccordionTrigger, AccordionContent | Base UI Accordion |
collapsible | @celestia-project/ui/primitive/collapsible | Collapsible, CollapsibleTrigger, CollapsibleContent | Base UI Collapsible |
command | @celestia-project/ui/primitive/command | Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator | cmdk |
direction | @celestia-project/ui/primitive/direction | DirectionProvider, useDirection | Radix Direction |
ripple | @celestia-project/ui/primitive/ripple | RippleContainer, useRipple, useGlobalRipple | Custom HTML |
sonner | @celestia-project/ui/primitive/sonner | Toaster, toast | sonner |
spinner | @celestia-project/ui/primitive/spinner | Spinner | Phosphor Icon |
toast | @celestia-project/ui/primitive/toast | ToastProvider, ToastPortal, ToastViewport, Toast, ToastContent, ToastTitle, ToastDescription, ToastAction, ToastClose, toast | Base UI Toast |
Key Component Props Reference
1. Button (button.tsx)
import { Button } from "@celestia-project/ui/primitive/button"| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "secondary" | "outline" | "ghost" | "quiet" | "destructive" | "link" | "default" | Visual style variant — default is an outlined primary face with the 3D shadow edge |
size | "default" | "xs" | "sm" | "md" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | "default" | Sizing option — default is 26px, matching the tabs' active pill |
mono | boolean | false | Renders the label in monospace |
leading | "relaxed" | "tight" | "relaxed" | Label leading — tight pins the 12px text step |
render | ReactElement | ((props, state) => ReactElement) | undefined | Base UI polymorphic render prop (replaces asChild) |
className | string | undefined | Custom CSS class overrides |
2. Badge (badge.tsx)
import { Badge } from "@celestia-project/ui/primitive/badge"| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "secondary" | "outline" | "ghost" | "link" | "destructive" | "success" | "warning" | "info" | "default" | Badge style variant |
size | "default" | "sm" | "default" | Height step — sm (h-4) for dense tables |
mono | boolean | false | Renders content in monospace |
render | ReactElement | ((props, state) => ReactElement) | undefined | Base UI polymorphic render prop |
className | string | undefined | Custom CSS class overrides |
3. Card (card.tsx)
import { Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter } from "@celestia-project/ui/primitive/card"| Component | Key Props | Description |
|---|---|---|
Card | size?: "default" | "sm" | Card container with hairline ring, radius, and fixed spacing rhythm |
CardHeader | className?: string | Header wrapper for title and description |
CardTitle | className?: string | Card title heading |
CardDescription | className?: string | Subtitle / description copy |
CardAction | className?: string | Action slot inside the card header |
CardContent | className?: string | Card body container |
CardFooter | className?: string | Bottom action bar |
4. Dialog & Sheet (dialog.tsx, sheet.tsx)
import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription } from "@celestia-project/ui/primitive/dialog"import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle } from "@celestia-project/ui/primitive/sheet"| Component | Prop | Type | Default | Description |
|---|---|---|---|---|
Dialog / Sheet | open | boolean | undefined | Controlled open state |
Dialog / Sheet | onOpenChange | (open: boolean) => void | undefined | State change callback |
SheetContent | side | "top" | "bottom" | "left" | "right" | "right" | Sheet slide-in position |
5. Sidebar (sidebar.tsx)
import { SidebarProvider, Sidebar, SidebarHeader, SidebarContent, SidebarGroup, SidebarMenu, SidebarMenuItem, SidebarMenuButton } from "@celestia-project/ui/composite/sidebar"| Component | Prop | Type | Default | Description |
|---|---|---|---|---|
SidebarProvider | defaultOpen | boolean | true | Initial state of sidebar |
SidebarProvider | open | boolean | undefined | Controlled state |
SidebarProvider | onOpenChange | (open: boolean) => void | undefined | Toggle handler |
Sidebar | side | "left" | "right" | "left" | Dock side |
Sidebar | variant | "sidebar" | "floating" | "inset" | "sidebar" | Layout style |
Sidebar | collapsible | "offcanvas" | "icon" | "none" | "offcanvas" | Collapse strategy |
SidebarMenuButton | isActive | boolean | false | Highlights active menu item |
SidebarMenuButton | tooltip | string | TooltipContentProps | undefined | Auto-tooltip on collapse |
6. Select (select.tsx)
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from "@celestia-project/ui/primitive/select"| Component | Prop | Type | Default | Description |
|---|---|---|---|---|
Select | defaultValue | unknown | undefined | Uncontrolled default value |
Select | value | unknown | undefined | Controlled value |
Select | onValueChange | (value: any) => void | undefined | Selection change handler |
SelectItem | value | unknown | Required | Option value identifier |
7. Attachment & Chat (attachment.tsx, message.tsx, bubble.tsx)
import { Attachment, AttachmentMedia, AttachmentContent, AttachmentTitle, AttachmentDescription } from "@celestia-project/ui/composite/attachment"| Component | Prop | Type | Default | Description |
|---|---|---|---|---|
Attachment | state | "idle" | "uploading" | "processing" | "error" | "done" | "done" | Upload state indicator |
Attachment | size | "default" | "sm" | "xs" | "default" | Attachment sizing |
Attachment | orientation | "horizontal" | "vertical" | "horizontal" | Layout direction |
AttachmentMedia | variant | "icon" | "image" | "icon" | Media thumbnail display |