1.7 KiB
1.7 KiB
Frontend Design System
Principles
- Build product screens from shadcn/ui primitives and project-owned App components.
- Keep operational pages dense, quiet, and optimized for repeated use.
- Use semantic status colors for ticket state, priority, audit, AI, and system feedback.
- User-facing frontend text must be Chinese-first. Internal TypeScript names and API field names may stay English.
- Business pages must not create one-off table, filter, detail, status, or priority patterns.
Tokens
Theme tokens live in frontend/src/styles/globals.css and are exposed through Tailwind in
frontend/tailwind.config.ts.
Core tokens:
background,foreground,surface,bordermuted,muted-foregroundprimary,success,warning,danger,info,ai
Components
shadcn/ui primitives live in frontend/src/components/ui and should remain close to generated shadcn APIs:
ButtonBadgeCard,CardHeader,CardContent,CardTitle,CardDescriptionInput,Textarea,SelectTableDialog,Sheet,DropdownMenu,Tabs,Tooltip,Skeleton,Sonner
Product App components live in frontend/src/components/app and are the preferred page-level API:
AppSidebarAppTopbarAppPageHeaderAppDataTableAppFilterBarAppDetailLayoutAppSectionAppEmptyStateAppStatusBadgeAppPriorityBadge
Business pages should use:
AppDataTablefor repeated table/list surfaces.AppFilterBarfor search and filter controls.AppDetailLayoutfor detail pages with main content and side panels.AppStatusBadgeandAppPriorityBadgefor ticket lifecycle and priority presentation.
Preview page:
frontend/src/features/design-system/DesignSystemPreview.tsx