Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.yourhq.ai/llms.txt

Use this file to discover all available pages before exploring further.

Primitives are the lowest layer of the component system. They live in apps/ui/src/components/ui/ and are mostly stock shadcn/ui (New York style, neutral base, CSS variables enabled — see components.json) with a few HQ-specific additions called out below. Don’t reach past primitives. If something can be composed from these, compose it. If it can’t, build it as a composite in components/shared/, never as another primitive.

Layout and containers

Structural pieces. They organize space; they don’t carry state of their own.
ComponentFilePurpose
Cardcard.tsxBordered surface with semantic slots: CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter.
Tabstabs.tsxTwo CVA variants: default (pill) and line (underline). Horizontal and vertical.
Accordionaccordion.tsxStacked collapsible sections.
Collapsiblecollapsible.tsxSingle collapsible region (no accordion grouping).
Separatorseparator.tsx1px divider, horizontal or vertical.
ScrollAreascroll-area.tsxCustom-styled scrollable container. Thin scrollbars match the global token.
Resizableresizable.tsxDrag-to-resize panels (react-resizable-panels).
AspectRatioaspect-ratio.tsxFixed-ratio container for media.
Sidebarsidebar.tsxLow-level sidebar primitive. The dashboard shell uses its own composition; reach for this only if you need a second sidebar surface.

Forms and input

Reach for Form first. It wires React Hook Form + Zod and handles labels, descriptions, and errors consistently. Only use bare inputs when there is no form (search boxes, ad-hoc filters, inline-edit cells).
ComponentFilePurpose
Form, FormField, FormItem, FormLabel, FormControl, FormDescription, FormMessageform.tsxThe full RHF + Zod stack. Auto-IDs, aria-describedby, aria-invalid wired up.
Fieldfield.tsxHQ extension. Labeled field wrapper for form-less surfaces (filters, settings panels).
Labellabel.tsxRadix label primitive used inside Form.
Inputinput.tsxSingle-line text. Supports type="file".
Textareatextarea.tsxMulti-line plaintext. For rich text use the Novel editor instead.
InputGroupinput-group.tsxHQ extension. Input with prefix or suffix slot.
InputOtpinput-otp.tsxSegmented one-time-password input.
Checkboxcheckbox.tsxIndeterminate-aware checkbox.
RadioGroupradio-group.tsxSingle-select radio set.
Switchswitch.tsxBoolean toggle. Use for “is enabled” semantics; use Checkbox for selection.
Selectselect.tsxCustom-styled select with searchable items.
NativeSelectnative-select.tsxReal <select>. Use on mobile or when full keyboard control matters more than visual polish.
Comboboxcombobox.tsxSearch-as-you-type select with multi-select support.
TagInputtag-input.tsxHQ extension. Multi-value chip input — Enter or comma to commit.
Sliderslider.tsxRange slider, single or dual handle.
Toggletoggle.tsxBinary on/off button.
ToggleGrouptoggle-group.tsxSingle or multiple-select toggle row (view switchers, formatting bars).

Actions and controls

ComponentFilePurpose
Buttonbutton.tsxVariants: default, destructive, outline, secondary, ghost, link. Sizes: default, xs, sm, lg, icon, icon-xs, icon-sm, icon-lg. CVA-driven; do not subclass.
ButtonGroupbutton-group.tsxAdjacent buttons treated as a single segmented control (split actions).
Itemitem.tsxGeneric clickable row primitive — base for sidebar entries, list rows, palette results.

Overlays

Pick the overlay by intent, not by visual shape:
  • Dialog — focused decision the user must respond to (confirm, quick-create with ≤3 fields).
  • AlertDialog — destructive or otherwise irreversible decisions; cannot be dismissed by clicking outside. Composed via ConfirmDialog.
  • Sheet — multi-field forms or detail surfaces that benefit from staying alongside the page; preferred over Dialog for create flows. Composed via SidePanel.
  • Drawer — bottom-up mobile pattern (Vaul). Used sparingly; prefer Sheet for desktop+mobile parity.
  • Popover / HoverCard / Tooltip — non-modal supplementary content, in increasing weight (tooltip = label, hover-card = preview, popover = interactive).
  • DropdownMenu / ContextMenu — action lists triggered by click vs. right-click respectively.
  • NavigationMenu / Menubar — top-of-app menus. Rarely used at HQ; the command palette covers most navigation.
  • Command — cmdk primitive used inside the command palette composite.
ComponentFile
Dialogdialog.tsx
AlertDialogalert-dialog.tsx
Sheetsheet.tsx
Drawerdrawer.tsx
Popoverpopover.tsx
HoverCardhover-card.tsx
Tooltiptooltip.tsx
DropdownMenudropdown-menu.tsx
ContextMenucontext-menu.tsx
NavigationMenunavigation-menu.tsx
Menubarmenubar.tsx
Commandcommand.tsx

Display and data

ComponentFilePurpose
Tabletable.tsxSemantic <table> with sticky-header support. Most lists use the DataTable composite on top.
Badgebadge.tsxVariants: default, secondary, destructive, outline, ghost, link.
Avataravatar.tsxImage with text fallback.
StatusDotstatus-dot.tsxHQ extension. Small colored dot for status indicators on rows. Pair with text-status-* tokens.
Progressprogress.tsxDeterminate progress bar.
Chartchart.tsxRecharts wrapper. Consumes --chart-1..5 tokens.
Calendarcalendar.tsxMonth-grid date picker.
DatePickerButtondate-picker-button.tsxHQ extension. Popover-button date picker for inline use.
Paginationpagination.tsxPage-number navigation.
Carouselcarousel.tsxHorizontal-scroll carousel (Embla).
Breadcrumbbreadcrumb.tsxPath-style navigation; used inside the header bar.

Feedback

ComponentFilePurpose
Alertalert.tsxPersistent inline message. Use for unrecoverable warnings; transient feedback should use a toast.
Skeletonskeleton.tsxanimate-pulse placeholder block. Compose with LoadingSkeleton for full-list shapes.
Spinnerspinner.tsxAnimated Loader2 icon. Use only when a skeleton would be misleading.
Sonner (Toaster)sonner.tsxToast outlet. Mounted once in the root layout. Call via toast(), toast.success(), toast.error(), toast.loading().
Emptyempty.tsxSemantic empty-state primitives (icon, title, description). The EmptyState composite is preferred for full screens.

Utilities

ComponentFilePurpose
Kbdkbd.tsxHQ extension. Keyboard-key chip. Used in shortcut hints and the help sheet.
InlineEditinline-edit.tsxHQ extension. Click-to-edit text and textarea with Enter to commit, Escape to cancel.
Directiondirection.tsxLTR/RTL provider. Currently unused; reserved for internationalization.

HQ extensions called out

These are the primitives we added on top of stock shadcn/ui. New extensions should be rare — most needs are better served by composing in shared/. If you do add one, follow the existing files for style: CVA for variants, data-slot attributes on composed pieces, no business logic, no module imports.