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:

bash
pnpm dlx shadcn@latest add button -c apps/web

Colors

The design system uses two layers of Celestia color tokens: landing tokens (forced dark theme) and semantic tokens (light/dark theme support).

Landing Tokens

bg#0a0a0a
surface#141414
text-primary#f5f5f5
fog#878787
stroke#262626

Brand Accent

accent-gradient#dc2626 → #b51230

Semantic Tokens

backgroundoklch(1 0 0)
foregroundoklch(0.145 0 0)
primaryoklch(0.55 0.22 27)
secondaryoklch(0.97 0 0)
mutedoklch(0.97 0 0)
accentoklch(0.97 0 0)
destructiveoklch(0.577 0.245 27.325)
borderoklch(0.922 0 0)

Chart Colors

1
2
3
4
5

Landing Tokens

These tokens are always dark and used exclusively on the landing page. They're defined in packages/ui/src/styles/globals.css.

TokenUtility ClassRoleValueHex Approximation
--bgbg-bgPage backgroundhsl(0 0% 4%)#0a0a0a
--surfacebg-surfaceCards, raised panelshsl(0 0% 8%)#141414
--texttext-text-primaryHeadings, primary copyhsl(0 0% 96%)#f5f5f5
(literal)text-fogSecondary/muted copyhsl(0 0% 53%)#878787
--strokeborder-strokeBorders, dividershsl(0 0% 15%)#262626

Brand Accent

The brand accent is tokenized — consume it with utilities, never with hex literals:

TokenUtilityValueRole
--brandbg-brand / text-brand / border-brandhsl(0 72% 51%) ≈ #dc2626Accent, links, dots, hover borders
--brand-deepbg-brand-deep / text-brand-deephsl(350 78% 40%) ≈ #b51230Gradient end, pressed states
--brand-foregroundtext-brand-foregroundhsl(0 0% 100%) ≈ #ffffffText/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)

TokenUtility ClassRoleValue
--backgroundbg-backgroundPage backgroundoklch(1 0 0) (white)
--foregroundtext-foregroundPrimary textoklch(0.145 0 0) (near-black)
--cardbg-cardCard backgroundsoklch(1 0 0) (white)
--card-foregroundtext-card-foregroundCard textoklch(0.145 0 0) (near-black)
--primarybg-primaryPrimary buttonsoklch(0.55 0.22 27) (red)
--primary-foregroundtext-primary-foregroundPrimary button textoklch(0.985 0 0) (white)
--secondarybg-secondarySecondary buttonsoklch(0.97 0 0) (light gray)
--secondary-foregroundtext-secondary-foregroundSecondary button textoklch(0.205 0 0) (dark gray)
--mutedbg-mutedMuted backgroundsoklch(0.97 0 0) (light gray)
--muted-foregroundtext-muted-foregroundMuted textoklch(0.54 0 0) (mid-gray)
--accentbg-accentAccent backgroundsoklch(0.97 0 0) (light gray)
--accent-foregroundtext-accent-foregroundAccent textoklch(0.205 0 0) (dark gray)
--destructivebg-destructiveError statesoklch(0.577 0.245 27.325) (red)
--destructive-foregroundtext-destructive-foregroundText on a destructive filloklch(1 0 0) (white — 4.77:1 on #e7000b)
--borderborder-borderBordersoklch(0.922 0 0) (light gray)
--inputborder-inputInput bordersoklch(0.922 0 0) (light gray)
--ringring-ringFocus ringsoklch(0.55 0.22 27) (red)
--overlaybg-overlayDialog/sheet scrimoklch(0 0 0 / 70%)

Dark Theme (.dark)

TokenUtility ClassRoleValue
--backgroundbg-backgroundPage backgroundoklch(0.145 0 0) (dark gray)
--foregroundtext-foregroundPrimary textoklch(0.985 0 0) (white)
--cardbg-cardCard backgroundsoklch(0.205 0 0) (dark gray)
--card-foregroundtext-card-foregroundCard textoklch(0.985 0 0) (white)
--primarybg-primaryPrimary buttonsoklch(0.68 0.22 27) (light red)
--primary-foregroundtext-primary-foregroundPrimary button textoklch(0.145 0 0) (near-black)
--secondarybg-secondarySecondary buttonsoklch(0.269 0 0) (dark gray)
--secondary-foregroundtext-secondary-foregroundSecondary button textoklch(0.985 0 0) (white)
--mutedbg-mutedMuted backgroundsoklch(0.269 0 0) (dark gray)
--muted-foregroundtext-muted-foregroundMuted textoklch(0.708 0 0) (mid-gray)
--accentbg-accentAccent backgroundsoklch(0.269 0 0) (dark gray)
--accent-foregroundtext-accent-foregroundAccent textoklch(0.985 0 0) (white)
--destructivebg-destructiveError statesoklch(0.704 0.191 22.216) (red)
--borderborder-borderBordersoklch(1 0 0 / 10%) (white with 10% opacity)
--inputborder-inputInput bordersoklch(1 0 0 / 15%) (white with 15% opacity)
--ringring-ringFocus ringsoklch(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.

TokenValue
--chart-1oklch(0.87 0 0)
--chart-2oklch(0.556 0 0)
--chart-3oklch(0.439 0 0)
--chart-4oklch(0.371 0 0)
--chart-5oklch(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):

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):

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%; }  }}

Barrel imports pull from the package root. All components are tree-shakeable in modern bundlers (Next.js, Vite).

tsx
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 / Toaster is exported as Toast / Toaster.
  • Sonner Toaster is exported as SonnerToaster.

3. Deep Imports

For strict bundle-size optimizations or non-bundler environments, import directly from the module paths:

tsx
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 NameImport SpecifierDescription
cn@celestia-project/ui/lib/utils or barrelclsx + tailwind-merge class name helper
useIsMobile@celestia-project/ui/hooks/use-mobile or barrelCustom React hook returning boolean for < 768px viewport
SonnerToaster@celestia-project/ui (barrel)Re-exported Sonner Toaster
toast@celestia-project/ui/primitive/sonnerSonner 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.

GroupMembersSits in
Shells & authAuthShell, MarketingShell, PageShell, DashboardShell, the auth screensIts own chrome
ScreensDashboardPage, ProfilePage, SettingsPage, ListPage, BillingPage, StatusPage + not-found/errorPageShell / DashboardShell
Marketing & contentLandingPage, PricingPage, BlogIndexPage, ArticlePageMarketingShell
CollaborationInboxPage, ChatPage, KanbanPage, CalendarPage, FilesPagePageShell
Data & insightsAnalyticsPage, ReportsPage, RecordDetailPage, SearchPage, AuditLogPagePageShell / DashboardPage
Commerce & flowsCheckoutPage, InvoicePage, OnboardingPage, TeamPage, IntegrationsPagePageShell

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.

ModuleDeep ImportExported Sub-ComponentsBase Primitive
analytics-pageapps/web/components/layout-templates/analytics-page.tsxAnalyticsPage, AnalyticsBreakdownRowDashboardPage + Card + Progress
article-pageapps/web/components/layout-templates/article-page.tsxArticlePage, ArticleTocItem, ArticleAuthor, RelatedArticleCustom HTML + Avatar + Badge + Separator
aspect-ratio@celestia-project/ui/primitive/aspect-ratioAspectRatioRadix AspectRatio
audit-log-pageapps/web/components/layout-templates/audit-log-page.tsxAuditLogPage, AuditEvent, AuditTonePageShell + Custom HTML
auth-shell@celestia-project/ui/composite/auth-shellAuthShellCustom HTML
billing-pageapps/web/components/layout-templates/billing-page.tsxBillingPage, BillingPlan, BillingUsage, BillingInvoicePageShell + Card + Progress + Table
blog-index-pageapps/web/components/layout-templates/blog-index-page.tsxBlogIndexPage, BlogPostCustom HTML + Badge
calendar-pageapps/web/components/layout-templates/calendar-page.tsxCalendarPage, CalendarDay, CalendarEvent, CalendarAgendaItem, CalendarTonePageShell + Custom HTML
card@celestia-project/ui/primitive/cardCard, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooterCustom HTML
chat-pageapps/web/components/layout-templates/chat-page.tsxChatPage, ChatChannel, ChatThreadMessage, ChatMemberCustom HTML + Avatar
checkout-pageapps/web/components/layout-templates/checkout-page.tsxCheckoutPage, CheckoutStep, CheckoutSummaryRowPageShell + Button
dashboard-pageapps/web/components/layout-templates/dashboard-page.tsxDashboardPagePageShell + Card
dashboard-shell@celestia-project/ui/composite/dashboard-shellDashboardShellCustom HTML
error-pageapps/web/components/layout-templates/error-page.tsxErrorPageStatusPage
files-pageapps/web/components/layout-templates/files-page.tsxFilesPage, FileEntryPageShell + Table + Badge
forgot-password-pageapps/web/components/layout-templates/forgot-password-page.tsxForgotPasswordPageAuthShell
inbox-pageapps/web/components/layout-templates/inbox-page.tsxInboxPage, InboxFolder, InboxMessageCustom HTML
integrations-pageapps/web/components/layout-templates/integrations-page.tsxIntegrationsPage, IntegrationPageShell + Switch
invoice-pageapps/web/components/layout-templates/invoice-page.tsxInvoicePage, InvoiceParty, InvoiceLineItem, InvoiceTotalPageShell + Table
kanban-pageapps/web/components/layout-templates/kanban-page.tsxKanbanPage, KanbanColumn, KanbanCard, BoardTonePageShell + Badge
landing-pageapps/web/components/layout-templates/landing-page.tsxLandingPage, LandingFeature, LandingMetricCustom HTML
list-pageapps/web/components/layout-templates/list-page.tsxListPage, ListColumnPageShell + Table
marketing-shell@celestia-project/ui/composite/marketing-shellMarketingShellCustom HTML
not-found-pageapps/web/components/layout-templates/not-found-page.tsxNotFoundPageStatusPage
onboarding-pageapps/web/components/layout-templates/onboarding-page.tsxOnboardingPage, OnboardingStepPageShell + Custom HTML
page-shell@celestia-project/ui/composite/page-shellPageShellCustom HTML
pricing-pageapps/web/components/layout-templates/pricing-page.tsxPricingPage, PricingPlanCustom HTML + Badge
profile-pageapps/web/components/layout-templates/profile-page.tsxProfilePageBase UI Tabs + Avatar
record-detail-pageapps/web/components/layout-templates/record-detail-page.tsxRecordDetailPage, RecordDetailTab, RecordDetailMetaPageShell + Tabs + Avatar
reports-pageapps/web/components/layout-templates/reports-page.tsxReportsPage, ReportEntry, ReportStatusPageShell + Badge + Button
reset-password-pageapps/web/components/layout-templates/reset-password-page.tsxResetPasswordPageAuthShell
resizable@celestia-project/ui/primitive/resizableResizable, ResizablePanel, ResizablePanelGroup, ResizableHandlereact-resizable-panels
search-pageapps/web/components/layout-templates/search-page.tsxSearchPage, SearchFacet, SearchFacetOption, SearchResultPageShell + Checkbox + Input
separator@celestia-project/ui/primitive/separatorSeparatorBase UI Separator
settings-pageapps/web/components/layout-templates/settings-page.tsxSettingsPageCustom HTML
sidebar@celestia-project/ui/composite/sidebarSidebarProvider, Sidebar, SidebarHeader, SidebarContent, SidebarGroup, SidebarGroupLabel, SidebarGroupAction, SidebarGroupContent, SidebarFooter, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarMenuAction, SidebarMenuSub, SidebarMenuSubItem, SidebarMenuSubButton, SidebarMenuBadge, SidebarMenuSkeleton, SidebarRail, SidebarSeparator, SidebarTrigger, SidebarInset, SidebarInput, useSidebarCustom + Base UI Tooltip & Sheet
sign-in-pageapps/web/components/layout-templates/sign-in-page.tsxSignInPage, SocialProviderAuthShell
sign-up-pageapps/web/components/layout-templates/sign-up-page.tsxSignUpPageAuthShell
status-pageapps/web/components/layout-templates/status-page.tsxStatusPageCustom HTML
team-pageapps/web/components/layout-templates/team-page.tsxTeamPage, TeamMember, TeamMemberStatusPageShell + Avatar + Badge
two-factor-pageapps/web/components/layout-templates/two-factor-page.tsxTwoFactorPageAuthShell + input-otp

Shells vs. pages

ComponentFrame it ownsUse it when
AuthShellCentred card or split screen, logo, heading, provider aside, footerBuilding a bespoke signed-out screen
MarketingShellAnnouncement strip, nav bar (logo / nav / actions, optionally stickyNav), page body, footer bandAny public page — the hero is the title, so there is no title block to inherit
PageShellBlurred sticky header, title / description / actions, width presetsAny in-app page that is not a dashboard or profile
DashboardShellNavigation rail (brand, nav, navFooter), sticky header, content column, optional asideThe route-group layout of a signed-in app
DashboardPagePageShell + metric tile grid, loading skeletons, empty slot, secondary columnA dashboard overview
ProfilePageBanner, overlapping avatar, identity block, meta / stats rows, line-variant tab barA user profile screen
SettingsPageSection navigation beside stacked panelsAccount or workspace settings
ListPagePageShell + toolbar (search / filters / toolbar), selection with select-all, loading skeletons, empty state, paginationA table-driven index or CRUD list screen
BillingPagePageShell + plan card, usage meters, payment method, invoice tablePlan, usage and invoice history
StatusPageFull-viewport centred frame: status code or icon, title, description, optional monospace detail, two actionsAny bespoke not-the-page-you-asked-for state (403, 503, maintenance)
NotFoundPageStatusPage with 404 defaultsA missing route
ErrorPageStatusPage with 500 defaults plus a detail blockAn 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

ModuleDeep ImportExported Sub-ComponentsBase Primitive
alert@celestia-project/ui/primitive/alertAlert, AlertTitle, AlertDescriptionCustom HTML
article-card@celestia-project/ui/composite/article-cardArticleCardCustom HTML
badge@celestia-project/ui/primitive/badgeBadge, badgeVariantsBase UI useRender
breadcrumb@celestia-project/ui/primitive/breadcrumbBreadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsisCustom HTML
empty@celestia-project/ui/composite/emptyEmpty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyActions, EmptyMediaCustom HTML
item@celestia-project/ui/primitive/itemItem, ItemGroup, ItemHeader, ItemFooter, ItemTitle, ItemDescription, ItemMedia, ItemActions, ItemContentBase UI useRender
kbd@celestia-project/ui/primitive/kbdKbdCustom HTML
marker@celestia-project/ui/composite/markerMarkerCustom HTML
message@celestia-project/ui/composite/messageMessage, MessageBubbleCustom HTML
skeleton@celestia-project/ui/primitive/skeletonSkeletonCustom HTML
table@celestia-project/ui/primitive/tableTable, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaptionCustom HTML

Forms & Inputs

ModuleDeep ImportExported Sub-ComponentsBase Primitive
button@celestia-project/ui/primitive/buttonButton, buttonVariantsBase UI Button
button-group@celestia-project/ui/composite/button-groupButtonGroup, ButtonGroupTextCustom HTML
toolbar-menu@celestia-project/ui/composite/toolbar-menuToolbarMenu, ToolbarMenuItem, ToolbarMenuSeparatorCustom HTML
checkbox@celestia-project/ui/primitive/checkboxCheckboxBase UI Checkbox
combobox@celestia-project/ui/composite/comboboxCombobox, ComboboxInput, ComboboxContent, ComboboxList, ComboboxItem, ComboboxEmpty, ComboboxGroup, ComboboxLabelBase UI Combobox
field@celestia-project/ui/composite/fieldField, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparatorBase UI Field
filter@celestia-project/ui/composite/filterFilterBar, FilterChip, FilterMenu, FilterToken, FilterClearCustom HTML + Popover
form@celestia-project/ui/composite/formForm, FormField, FormItem, FormLabel, FormControl, FormDescription, FormMessage, useFormFieldreact-hook-form
input@celestia-project/ui/primitive/inputInputCustom HTML
input-group@celestia-project/ui/composite/input-groupInputGroup, InputGroupAddon, InputGroupInputCustom HTML
input-otp@celestia-project/ui/primitive/input-otpInputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparatorinput-otp
label@celestia-project/ui/primitive/labelLabelCustom HTML
native-select@celestia-project/ui/composite/native-selectNativeSelect, NativeSelectOptGroup, NativeSelectOptionCustom HTML
radio-group@celestia-project/ui/primitive/radio-groupRadioGroup, RadioGroupItemBase UI RadioGroup
select@celestia-project/ui/primitive/selectSelect, SelectTrigger, SelectValue, SelectContent, SelectItem, SelectGroup, SelectLabel, SelectSeparatorBase UI Select
select-env-input@celestia-project/ui/composite/select-env-inputColorizedUrlInputCustom HTML + Popover
slider@celestia-project/ui/primitive/sliderSliderBase UI Slider
switch@celestia-project/ui/primitive/switchSwitchBase UI Switch
textarea@celestia-project/ui/primitive/textareaTextareaCustom HTML
toggle@celestia-project/ui/primitive/toggleToggle, toggleVariantsBase UI Toggle
toggle-group@celestia-project/ui/composite/toggle-groupToggleGroup, ToggleGroupItemBase UI ToggleGroup

Overlays & Popups

ModuleDeep ImportExported Sub-ComponentsBase Primitive
alert-dialog@celestia-project/ui/composite/alert-dialogAlertDialog, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, AlertDialogCloseBase UI AlertDialog
context-menu@celestia-project/ui/primitive/context-menuContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuSub, ContextMenuSubTrigger, ContextMenuSubContentBase UI ContextMenu
dialog@celestia-project/ui/primitive/dialogDialog, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, DialogCloseBase UI Dialog
bottom-sheet@celestia-project/ui/primitive/bottom-sheetBottomSheet, BottomSheetTrigger, BottomSheetContent, BottomSheetHeader, BottomSheetBody, BottomSheetFooter, BottomSheetTitle, BottomSheetDescription, BottomSheetCloseBase UI Drawer (via Drawer)
drawer@celestia-project/ui/primitive/drawerDrawer, DrawerTrigger, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, DrawerCloseBase UI Drawer
dropdown-menu@celestia-project/ui/primitive/dropdown-menuDropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContentBase UI DropdownMenu
hover-card@celestia-project/ui/primitive/hover-cardHoverCard, HoverCardTrigger, HoverCardContentBase UI HoverCard
popover@celestia-project/ui/primitive/popoverPopover, PopoverTrigger, PopoverContentBase UI Popover
sheet@celestia-project/ui/primitive/sheetSheet, SheetTrigger, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, SheetCloseBase UI Dialog
tooltip@celestia-project/ui/primitive/tooltipTooltipProvider, Tooltip, TooltipTrigger, TooltipContentBase UI Tooltip

ModuleDeep ImportExported Sub-ComponentsBase Primitive
menu@celestia-project/ui/composite/menuMenu, MenuTrigger, MenuContent, MenuItem, MenuGroup, MenuSeparator, MenuCheckboxItem, MenuRadioItemBase UI Menu
menubar@celestia-project/ui/primitive/menubarMenubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarSub, MenubarSubTrigger, MenubarSubContentBase UI Menubar
navigation-menu@celestia-project/ui/primitive/navigation-menuNavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuTrigger, NavigationMenuContent, NavigationMenuLinkRadix NavigationMenu
pagination@celestia-project/ui/composite/paginationPagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsisCustom HTML
tabs@celestia-project/ui/primitive/tabsTabs, TabsList, TabsTrigger, TabsContentBase UI Tabs
tab-bar@celestia-project/ui/composite/tab-barTabBar, TabBarItemCustom HTML + Phosphor Icon

Data & Media

ModuleDeep ImportExported Sub-ComponentsBase Primitive
avatar@celestia-project/ui/primitive/avatarAvatar, AvatarImage, AvatarFallbackBase UI Avatar
calendar@celestia-project/ui/primitive/calendarCalendarreact-day-picker
carousel@celestia-project/ui/primitive/carouselCarousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNextembla-carousel-react
chart@celestia-project/ui/composite/chartChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyleRecharts wrapper
chart-area@celestia-project/ui/composite/chart-areaChartAreaRecharts + ChartContainer
chart-bar@celestia-project/ui/composite/chart-barChartBarRecharts + ChartContainer
chart-line@celestia-project/ui/composite/chart-lineChartLineRecharts + ChartContainer
chart-pie@celestia-project/ui/composite/chart-pieChartPieRecharts + ChartContainer
chart-radar@celestia-project/ui/composite/chart-radarChartRadarRecharts + ChartContainer
chart-radial@celestia-project/ui/composite/chart-radialChartRadialRecharts + ChartContainer
chart-sparkline@celestia-project/ui/composite/chart-sparklineChartSparklineRecharts
data-table@celestia-project/ui/composite/data-tableDataTable@tanstack/react-table + Table
progress@celestia-project/ui/primitive/progressProgressBase UI Progress
scroll-area@celestia-project/ui/primitive/scroll-areaScrollArea, ScrollBarRadix 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.

ModuleDeep ImportExported Sub-ComponentsBase Primitive
block-text-editor@celestia-project/ui/composite/block-text-editorBlockTextEditor, BlockSectionRenderer, ParagraphSection, HeadingSection, ListSection, TaskListSection, CodeSection, QuoteSection, ImageSection, plus block icons, drag pills, and add-section helpersCustom HTML
text-editor@celestia-project/ui/composite/text-editorTextEditor@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.

ModuleDeep ImportExported Sub-ComponentsPurpose
agent@celestia-project/ui/components/ai/agentAgent, AgentHeader, AgentTools, AgentOutputVisual AI agent profile with registered tool manifests
artifact@celestia-project/ui/components/ai/artifactArtifact, ArtifactHeader, ArtifactContent, ArtifactAction, ArtifactActions, ArtifactClose, ArtifactTitle, ArtifactDescriptionSidecar artifact container for generated documents, websites, and code
attachment@celestia-project/ui/components/ai/attachmentAttachment, AttachmentGroup, AttachmentMedia, AttachmentContent, AttachmentTitle, AttachmentDescription, AttachmentActions, AttachmentActionSingle upload item badge with progress state indicators
attachments@celestia-project/ui/components/ai/attachmentsAttachments, AttachmentItem, AttachmentPreview, AttachmentRemove, AttachmentEmpty, AttachmentHoverCard, AttachmentHoverCardTrigger, AttachmentHoverCardContentMulti-file attachment carousel and thumbnail hover preview grid
audio-player@celestia-project/ui/components/ai/audio-playerAudioPlayer, AudioPlayerElement, AudioPlayerControlBar, AudioPlayerPlayButton, AudioPlayerSeekBackwardButton, AudioPlayerSeekForwardButton, AudioPlayerTimeDisplay, AudioPlayerTimeRange, AudioPlayerDurationDisplay, AudioPlayerMuteButton, AudioPlayerVolumeRangeAI speech and voice synthesis audio playback controller powered by MediaChrome
bubble@celestia-project/ui/components/ai/bubbleBubble, BubbleGroup, BubbleContent, BubbleReactionsChat message speech bubble with customizable alignments, variants, and reactions
canvas@celestia-project/ui/components/ai/canvasCanvasInfinite canvas surface for AI workflow visual graphs
chain-of-thought@celestia-project/ui/components/ai/chain-of-thoughtChainOfThought, ChainOfThoughtStep, ChainOfThoughtOutputStep-by-step reasoning step timeline
chat-input@celestia-project/ui/components/ai/chat-inputChatInputMulti-line text input field tailored for conversational prompt entry
chat-message-area@celestia-project/ui/components/ai/chat-message-areaChatMessageAreaScrollable message container layout with automatic bubble stacking
chat-message@celestia-project/ui/components/ai/chat-messageChatMessageRole-based message container (user vs assistant) with distinct styling
checkpoint@celestia-project/ui/components/ai/checkpointCheckpoint, CheckpointTrigger, CheckpointContent, CheckpointRestore, CheckpointBadgeCheckpoint and snapshot version tracker for iterative AI generations
code-block@celestia-project/ui/components/ai/code-blockCodeBlock, CodeBlockHeader, CodeBlockTitle, CodeBlockCopyButton, CodeBlockLanguageSelectSyntax-highlighted code container powered by Shiki with copy button and language selector
commit@celestia-project/ui/components/ai/commitCommit, CommitHeader, CommitContent, CommitDiffGit commit and code modification diff viewer for AI code generators
confirmation@celestia-project/ui/components/ai/confirmationConfirmation, ConfirmationTitle, ConfirmationRequest, ConfirmationAccepted, ConfirmationRejected, ConfirmationActions, ConfirmationActionHuman-in-the-loop tool execution approval alert dialog
connection@celestia-project/ui/components/ai/connectionConnectionNode connection routing line for AI graph workflows
context@celestia-project/ui/components/ai/contextContext, ContextTrigger, ContextContent, ContextTokens, ContextCacheUsageLLM context window token counter and cache utilization monitor
controls@celestia-project/ui/components/ai/controlsControls, ControlItemZoom, pan, and fit-to-view navigation controls for canvas workflows
conversation@celestia-project/ui/components/ai/conversationConversation, ConversationContent, ConversationEmptyState, ConversationScrollToBottomPinned auto-scrolling chat stream container with stick-to-bottom behavior
edge@celestia-project/ui/components/ai/edgeEdgeVisual graph edge connector between workflow nodes
environment-variables@celestia-project/ui/components/ai/environment-variablesEnvironmentVariables, EnvironmentVariablesHeader, EnvironmentVariablesContentKey-value environment variable editor for AI tool sandboxes
file-tree@celestia-project/ui/components/ai/file-treeFileTree, FileTreeFolder, FileTreeFileInteractive workspace file tree hierarchy viewer
image@celestia-project/ui/components/ai/imageImageZoom, ImagePreviewAI generated image viewer with lightbox magnification and metadata
inline-citation@celestia-project/ui/components/ai/inline-citationInlineCitation, InlineCitationCard, InlineCitationSourcePer-sentence footnote popover linking directly to source citations
jsx-preview@celestia-project/ui/components/ai/jsx-previewJSXPreviewSafe JSX string sandbox renderer for live AI UI generation
message-scroller@celestia-project/ui/components/ai/message-scrollerMessageScrollerAuto-scrolling viewport maintaining scroll anchor during real-time streaming
message@celestia-project/ui/components/ai/messageAiMessage, AiMessageContent, MessageActions, MessageAction, MessageBranch, MessageBranchContent, MessageBranchSelector, MessageBranchPrevious, MessageBranchNext, MessageBranchPage, MessageResponse, MessageToolbarMarkdown-rendered message item with multi-branch switching and response actions
mic-selector@celestia-project/ui/components/ai/mic-selectorMicSelector, MicSelectorTrigger, MicSelectorContentInput microphone device selector dropdown
model-selector@celestia-project/ui/components/ai/model-selectorModelSelector, ModelSelectorTrigger, ModelSelectorContent, ModelSelectorInput, ModelSelectorList, ModelSelectorEmpty, ModelSelectorGroup, ModelSelectorItem, ModelSelectorShortcut, ModelSelectorSeparator, ModelSelectorLogo, ModelSelectorLogoGroup, ModelSelectorNameLLM model switcher with provider logos, shortcuts, and context metadata
node@celestia-project/ui/components/ai/nodeNode, NodeHeader, NodeContent, NodeActionInteractive workflow canvas node card
open-in-chat@celestia-project/ui/components/ai/open-in-chatOpenInChat, OpenInTrigger, OpenInChatGPT, OpenInClaudeQuick-launch external query in ChatGPT, Claude, or Perplexity
package-info@celestia-project/ui/components/ai/package-infoPackageInfo, PackageInfoHeader, PackageInfoContentPackage manifest and npm dependency analyzer
panel@celestia-project/ui/components/ai/panelPanel, PanelHeader, PanelContentFloating sidecar tool panel on infinite canvases
persona@celestia-project/ui/components/ai/personaPersona, PersonaAvatar, PersonaName, PersonaRoleAI assistant persona profile badge and role indicator
plan@celestia-project/ui/components/ai/planPlan, PlanHeader, PlanTitle, PlanDescription, PlanAction, PlanContent, PlanFooter, PlanTriggerCollapsible multi-step plan breakdown with live streaming shimmer
prompt-input@celestia-project/ui/components/ai/prompt-inputPromptInput, PromptInputTextarea, PromptInputHeader, PromptInputFooter, PromptInputTools, PromptInputButton, PromptInputSubmit, PromptInputActionMenu, PromptInputSelectRich AI prompt bar with multi-line expand, file upload dropzone, command autocomplete, and status controls
queue@celestia-project/ui/components/ai/queueQueue, QueueHeader, QueueItem, QueueContentBackground job execution and generation queue monitor
reasoning@celestia-project/ui/components/ai/reasoningReasoning, ReasoningTrigger, ReasoningContentCollapsible streaming chain-of-thought and model reasoning display with timer
sandbox@celestia-project/ui/components/ai/sandboxSandbox, SandboxHeader, SandboxContent, SandboxRunButtonLive code execution sandbox with output viewer
schema-display@celestia-project/ui/components/ai/schema-displaySchemaDisplayInteractive JSON Schema explorer and validator
shimmer@celestia-project/ui/components/ai/shimmerShimmerText skeleton shimmer animation effect during streaming generation
snippet@celestia-project/ui/components/ai/snippetSnippet, SnippetHeader, SnippetContent, SnippetCopyButtonCompact code snippet preview and one-click copy card
sources@celestia-project/ui/components/ai/sourcesSources, SourcesTrigger, SourcesContent, SourceCollapsible RAG source references panel with external links
speech-input@celestia-project/ui/components/ai/speech-inputSpeechInputSpeech-to-text voice input controller and audio visualizer
stack-trace@celestia-project/ui/components/ai/stack-traceStackTrace, StackTraceHeader, StackTraceFramesFormatted error stack trace analyzer and frame inspector
suggestion@celestia-project/ui/components/ai/suggestionSuggestions, SuggestionHorizontal scrollable prompt suggestions and quick action pills
task@celestia-project/ui/components/ai/taskTask, TaskTrigger, TaskContent, TaskItem, TaskItemFileMulti-step agent task progress display with status icons
terminal@celestia-project/ui/components/ai/terminalTerminal, TerminalHeader, TerminalContentSimulated terminal command executor and CLI output stream
test-results@celestia-project/ui/components/ai/test-resultsTestResults, TestResultSummary, TestResultListTest suite execution breakdown with pass/fail counts
tool@celestia-project/ui/components/ai/toolTool, ToolHeader, ToolContent, ToolInput, ToolOutputAgent tool call inspection and execution viewer with status badges
toolbar@celestia-project/ui/components/ai/toolbarToolbar, ToolbarButton, ToolbarSeparator, ToolbarGroupFloating AI action toolbar for canvas and text selections
transcription@celestia-project/ui/components/ai/transcriptionTranscription, TranscriptionSegmentAudio transcription synchronized viewer
voice-selector@celestia-project/ui/components/ai/voice-selectorVoiceSelector, VoiceSelectorTrigger, VoiceSelectorContent, VoiceSelectorListVoice selection dialog with audio previews and gender badges
web-preview@celestia-project/ui/components/ai/web-previewWebPreview, WebPreviewNavigation, WebPreviewAddressBarResponsive viewport browser frame for previewing generated web pages

Feedback & Utilities

ModuleDeep ImportExported Sub-ComponentsBase Primitive
accordion@celestia-project/ui/primitive/accordionAccordion, AccordionItem, AccordionTrigger, AccordionContentBase UI Accordion
collapsible@celestia-project/ui/primitive/collapsibleCollapsible, CollapsibleTrigger, CollapsibleContentBase UI Collapsible
command@celestia-project/ui/primitive/commandCommand, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparatorcmdk
direction@celestia-project/ui/primitive/directionDirectionProvider, useDirectionRadix Direction
ripple@celestia-project/ui/primitive/rippleRippleContainer, useRipple, useGlobalRippleCustom HTML
sonner@celestia-project/ui/primitive/sonnerToaster, toastsonner
spinner@celestia-project/ui/primitive/spinnerSpinnerPhosphor Icon
toast@celestia-project/ui/primitive/toastToastProvider, ToastPortal, ToastViewport, Toast, ToastContent, ToastTitle, ToastDescription, ToastAction, ToastClose, toastBase UI Toast

Key Component Props Reference

1. Button (button.tsx)

tsx
import { Button } from "@celestia-project/ui/primitive/button"
PropTypeDefaultDescription
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
monobooleanfalseRenders the label in monospace
leading"relaxed" | "tight""relaxed"Label leading — tight pins the 12px text step
renderReactElement | ((props, state) => ReactElement)undefinedBase UI polymorphic render prop (replaces asChild)
classNamestringundefinedCustom CSS class overrides

2. Badge (badge.tsx)

tsx
import { Badge } from "@celestia-project/ui/primitive/badge"
PropTypeDefaultDescription
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
monobooleanfalseRenders content in monospace
renderReactElement | ((props, state) => ReactElement)undefinedBase UI polymorphic render prop
classNamestringundefinedCustom CSS class overrides

3. Card (card.tsx)

tsx
import { Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter } from "@celestia-project/ui/primitive/card"
ComponentKey PropsDescription
Cardsize?: "default" | "sm"Card container with hairline ring, radius, and fixed spacing rhythm
CardHeaderclassName?: stringHeader wrapper for title and description
CardTitleclassName?: stringCard title heading
CardDescriptionclassName?: stringSubtitle / description copy
CardActionclassName?: stringAction slot inside the card header
CardContentclassName?: stringCard body container
CardFooterclassName?: stringBottom action bar

4. Dialog & Sheet (dialog.tsx, sheet.tsx)

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"
ComponentPropTypeDefaultDescription
Dialog / SheetopenbooleanundefinedControlled open state
Dialog / SheetonOpenChange(open: boolean) => voidundefinedState change callback
SheetContentside"top" | "bottom" | "left" | "right""right"Sheet slide-in position

5. Sidebar (sidebar.tsx)

tsx
import { SidebarProvider, Sidebar, SidebarHeader, SidebarContent, SidebarGroup, SidebarMenu, SidebarMenuItem, SidebarMenuButton } from "@celestia-project/ui/composite/sidebar"
ComponentPropTypeDefaultDescription
SidebarProviderdefaultOpenbooleantrueInitial state of sidebar
SidebarProvideropenbooleanundefinedControlled state
SidebarProvideronOpenChange(open: boolean) => voidundefinedToggle handler
Sidebarside"left" | "right""left"Dock side
Sidebarvariant"sidebar" | "floating" | "inset""sidebar"Layout style
Sidebarcollapsible"offcanvas" | "icon" | "none""offcanvas"Collapse strategy
SidebarMenuButtonisActivebooleanfalseHighlights active menu item
SidebarMenuButtontooltipstring | TooltipContentPropsundefinedAuto-tooltip on collapse

6. Select (select.tsx)

tsx
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from "@celestia-project/ui/primitive/select"
ComponentPropTypeDefaultDescription
SelectdefaultValueunknownundefinedUncontrolled default value
SelectvalueunknownundefinedControlled value
SelectonValueChange(value: any) => voidundefinedSelection change handler
SelectItemvalueunknownRequiredOption value identifier

7. Attachment & Chat (attachment.tsx, message.tsx, bubble.tsx)

tsx
import { Attachment, AttachmentMedia, AttachmentContent, AttachmentTitle, AttachmentDescription } from "@celestia-project/ui/composite/attachment"
ComponentPropTypeDefaultDescription
Attachmentstate"idle" | "uploading" | "processing" | "error" | "done""done"Upload state indicator
Attachmentsize"default" | "sm" | "xs""default"Attachment sizing
Attachmentorientation"horizontal" | "vertical""horizontal"Layout direction
AttachmentMediavariant"icon" | "image""icon"Media thumbnail display