This document establishes the official UI design patterns and component standards for the DeployStack frontend. All new components and pages must follow these guidelines to ensure consistency and maintainability.
Design Principles
- Consistency: Use established patterns and components
- Accessibility: Follow WCAG guidelines and semantic HTML
- Responsiveness: Design for all screen sizes
- Performance: Optimize for fast loading and smooth interactions
- Maintainability: Write clean, reusable component code
Color System
Primary Colors
The DeployStack color palette uses neutral black as the primary color, following the default shadcn design system for a clean, professional appearance.
WCAG Compliance
- Primary (neutral-900): Contrast ratio ~16:1 on white - ✅ AA Pass, ✅ AAA Pass
- Dark mode primary (white): Contrast ratio ~16:1 on dark background - ✅ AA Pass, ✅ AAA Pass
This ensures excellent accessibility with high contrast ratios in both light and dark modes.
Gray Colors
Only use Tailwind’s neutral gray palette. Do not use zinc, gray, slate, or stone for gray colors. This ensures consistent gray tones across the application matching our design system (#EBEBEB = neutral-200).
Text Colors
Background Colors
Link Utility Class
DeployStack provides a .link utility class for styled text links. This is an opt-in approach - links are unstyled by default to avoid conflicts with navigation components and buttons.
The .link Class
Apply the .link class to anchor elements when you want styled text links:
Styling applied:
text-blue-600 - Blue color
underline underline-offset-4 - Underline with offset
hover:text-blue-800 - Darker blue on hover
Usage Examples
When to Use .link
Color Usage Guidelines
- Primary Actions: Use
--primary (neutral-900) for primary buttons and key interactive elements
- Hover States: Use slightly lighter/darker variants for hover feedback
- Text Links: Add
.link class for blue styled links in content areas
- Button Links: Include styling classes (
bg-*, rounded-*) to maintain button appearance
- Focus States: Ensure all interactive elements have visible focus indicators
Layout Design Patterns
Content Wrapper Pattern
DeployStack follows a mandatory content wrapper pattern for all tabbed content and detail pages. This pattern ensures visual consistency and proper content hierarchy throughout the application.
Design Requirements
The content wrapper pattern is required for:
- Team management pages
- MCP server installation pages
- Settings and configuration pages
- Any page using tabbed content with
DsTabs
- Detail views that need elevated content presentation
Implementation
Use the ContentWrapper component for all qualifying pages:
The wrapper provides:
- Gray background container (
bg-muted/50)
- Responsive max-width constraints
- White card elevation with proper spacing
- Consistent vertical rhythm
For complete implementation details, see the component source code at services/frontend/src/components/ContentWrapper.vue.
Visual Hierarchy
This pattern creates a three-tier visual hierarchy:
- Page background - Default dashboard background
- Content container - Gray muted background wrapper
- Content card - White elevated card with content
This hierarchy is a design system requirement and must be followed consistently across all applicable pages.
Data Tables
For data table implementation, see the dedicated Table Design System guide.
For pagination implementation, see the Pagination Implementation Guide.
Badge Design Patterns
Badges are used for status indicators, categories, and metadata.
Status Badges
Category/Tag Badges
Numeric Badges
Dialog Patterns
Confirmation Dialogs
For simple yes/no confirmation dialogs (delete confirmations, enable/disable toggles, destructive actions), always use AlertDialog. This component interrupts the user with important content and expects a response.
When to Use AlertDialog
- Delete confirmations
- Enable/disable toggles
- Destructive actions that cannot be undone
- Any action requiring explicit user confirmation
For dialogs used in multiple places, extract them as reusable components in components/mcp-server/ or similar directories. Examples:
McpServerDeleteDialog.vue - Delete confirmation for MCP servers
McpServerStatusDialog.vue - Enable/disable confirmation
Use AlertDialog for forms in modals:
Loading State Patterns
Choose the appropriate loading indicator based on what’s being loaded:
Content Loading → Use Skeleton
When loading page content, data lists, or complex UI sections, use Skeleton components that match the shape of the content being loaded. This provides a better user experience by showing users what to expect.
Use Skeleton for:
- Page content loading
- Data tables and lists
- Cards and detail views
- Form sections loading from API
- Any content where you can predict the layout
For button clicks and quick actions, use the built-in button loading state with a spinner. This indicates the action is processing without disrupting the page layout.
Use Spinner for:
- Form submissions
- Button click actions
- Quick API calls (enable/disable toggles)
- Actions that don’t change page structure
Why Skeleton Over Spinner for Content
Empty State Patterns
MANDATORY: Always use the shadcn-vue Empty component for no-data states. Never create custom empty state markup with manual styling.
Basic Empty State
Empty State with Actions
Use Empty component for:
- No search results
- Empty data tables
- No tools/resources discovered
- Missing configuration items
- Any state where data is expected but not present
Loading States
Buttons now include built-in loading state functionality. For comprehensive loading button documentation, see the Button Loading States Guide.
Primary Actions
Secondary Actions
Destructive Actions
Layout Patterns
Content Sections
Icon Usage
Standard Icon Sizes
- Small icons:
h-4 w-4 (16px) - for buttons, table actions
- Medium icons:
h-5 w-5 (20px) - for form fields, navigation
- Large icons:
h-6 w-6 (24px) - for page headers, prominent actions
Icon with Text
Status Icons
Responsive Design
Mobile-First Approach
Hide/Show on Different Screens
Accessibility Guidelines
Screen Reader Support
Proper Labels
Focus Management
Migration Guide
Updating Existing Tables
If you have an existing table using raw HTML elements, follow these steps:
-
Replace HTML elements with shadcn-vue components:
<table> → <Table>
<thead> → <TableHeader>
<tbody> → <TableBody>
<tr> → <TableRow>
<th> → <TableHead>
<td> → <TableCell>
-
Update imports:
-
Add proper empty state handling
-
Update action menus to use AlertDialog for destructive actions
-
Ensure proper badge usage for status indicators
For detailed migration strategies and architectural considerations, see the Frontend Architecture - Migration Guidelines.