CrossChecks AOC
Front-End Reference
A complete reference for the design tokens, component library, layout patterns, and navigation structure used in the CrossChecks AOC Studio application.
Color Palette
All colors are defined as HSL CSS custom properties in globals.css and consumed via Tailwind's theme extension. The application is light-mode only in production.
Defined as CSS variables, used by Recharts via the chart.tsx wrapper.
Typography
Tailwind: font-body
Weights: 400, 700
Tailwind: font-headline
Weights: 400, 700
Radius & Shadows
rounded-sm
rounded-md
rounded-lg
--radius
rounded-full
badges, avatars
Dialogs
Badge
No Radix primitive. Simple inline-flex pill with border and variant classes.
Expiring: bg-[#facc15] text-[#713f12]
Input / Textarea
Native HTML elements. No Radix primitive. Styled to match design tokens.
Select
Wraps @radix-ui/react-select.
Item: relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent
Checkbox
Wraps @radix-ui/react-checkbox.
Checked: data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground
Card
Composable div-based component. No Radix primitive. Five sub-components: Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter.
CardHeader: flex flex-col space-y-1.5 p-6
CardTitle: text-2xl font-semibold leading-none tracking-tight
CardDescription: text-sm text-muted-foreground
CardContent: p-6 pt-0
CardFooter: flex items-center p-6 pt-0
Alert
No Radix primitive. Two variants: default and destructive.
Default: bg-background text-foreground
Destructive: border-destructive/50 text-destructive
Spinner
Simple CSS animation. Used in loading states across the app.
Toast
Built on @radix-ui/react-toast. Two variants. Positioned bottom-right on desktop, top on mobile.
Destructive: destructive group border-destructive bg-destructive text-destructive-foreground
Position (desktop): fixed bottom-0 right-0 z-[100] p-4 md:max-w-[420px]
Open: animate-in slide-in-from-bottom-full | Close: animate-out fade-out-80 slide-out-to-right-full
Dialog
Built on @radix-ui/react-dialog. Used for profile edit, org switching, red-tag notices, image galleries.
Content: fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 sm:rounded-lg
Title: text-lg font-semibold leading-none tracking-tight
Description: text-sm text-muted-foreground
Table
Semantic HTML table wrapper. No Radix primitive. Eight sub-components.
| Registration | Aircraft Type | Organisation | Status | Actions |
|---|---|---|---|---|
| ZS-OAB | Boeing 737-800 | CrossChecks Aviation | Active | |
| ZS-JFA | Cessna 172 | CrossChecks Aviation | Expired | |
| ZS-MNB | Airbus A320 | Coastal Air | Expiring |
TableCell: p-4 align-middle border-r last:border-r-0
TableRow: border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted
Form Field
Composed of FormItem, FormLabel, FormControl, FormDescription, FormMessage. Integrates with react-hook-form and zod.
As it appears on your official ID.
Please enter a valid email address.
FormLabel (error): text-destructive
FormDescription: text-sm text-muted-foreground
FormMessage: text-sm font-medium text-destructive
Signature Pad
Canvas-based signature input using react-signature-canvas. Used in hazard/incident/accident reports.
Canvas: w-full h-[200px] rounded-md bg-card
Clear button: absolute bottom-2 right-2 (outline variant, sm size)
Rich Text Editor
Wraps react-quill with the Snow theme. Used in the Notices module for formatted notice content.
Toolbar modules: headers, bold, italic, underline, strike, list, link, clean
Min height: .ql-editor { min-height: 150px } (globals.css)
Multi-Select Checkbox
Custom component. Trigger button opens a Radix Popover containing checkboxes. Used for assigning roles and selecting multiple items.
Popover content: p-0
Item: p-2 flex items-center cursor-pointer | Selected: bg-accent
Checkbox: mr-2 (Radix Checkbox)
File Input
Custom styled file picker. Real input is sr-only; visual trigger is a styled div.
Actual input: sr-only
File icon color: text-green-500 when file selected
Image Gallery Dialog
Dialog with upload section and responsive image grid. Used for attaching photos to reports and assets. Max dialog width sm:max-w-[800px].
Item: cursor-pointer relative aspect-square hover:ring-2 hover:ring-primary
Max height content: max-h-[60vh] overflow-y-auto
App Shell
The main app shell is a CSS Grid with a collapsible sidebar. The sidebar persists its state in a browser cookie (sidebar_state, 7-day expiry). Toggle with Ctrl/⌘+B.
md:grid-cols-[280px_1fr]
md:grid-cols-[80px_1fr]
Width: 288px (18rem)
Hidden: md:hidden
bg-white border-b
Logo centered (org view)
Page Patterns
Card header: flex flex-row items-center justify-between space-y-0 pb-2
Icon: rounded-full p-1 h-8 w-8 (coloured bg: bg-yellow-100 text-yellow-500 etc.)
Value: text-2xl font-bold
| Name | Category | Expiry | Status | Actions |
|---|---|---|---|---|
| Boeing 737-800 | Aircraft | 2025-12-01 | Active |
Search + filters left, actions (Export, Add) right
Table: full-width with custom TableHead/TableCell border-r styling
Add New Asset
Fill in the details below to register a new asset.
Form managed by react-hook-form + Zod schema
Save triggers POST /api/{slug}/{collection}/ — body validated against collection schema_json
Left: flex items-center justify-center — form centered, mx-auto max-w-sm
Right: hidden lg:flex bg-primary/5 — notices + benefits panel
Logo: bg-sidebar p-4 rounded-md (uses sidebar dark bg)
Icon Library
All icons are from Lucide React (lucide-react@^0.475). Default size in components: [&_svg]:size-4 (16px). Sidebar icons: 14–16px.
Version: lucide-react@^0.475.0
Default SVG size in Button: [&_svg]:size-4 [&_svg]:shrink-0
Responsive Breakpoints
Standard Tailwind breakpoints. The app is primarily a desktop application — mobile support is available via Sheet sidebar and single-column layouts.