Comprehensive guide to UI components, styling patterns, and design standards for the DeployStack frontend.
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
The DeployStack color palette uses neutral black as the primary color, following the default shadcn design system for a clean, professional appearance.
/* Primary Brand Colors */--primary: hsl(240 5.9% 10%); /* neutral-900 - Dark gray/black */--primary-foreground: hsl(0 0% 98%); /* White text on primary */
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).
/* Light Mode / Dark Mode */--bg-primary: white / theme('colors.neutral.900');--bg-secondary: theme('colors.neutral.50') / theme('colors.neutral.800');
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:
underline underline-offset-4 - Underline with offset
hover:text-blue-800 - Darker blue on hover
Usage Examples
<!-- ✅ Styled text link with .link class --><a href="/about" class="link">Learn more about us</a><!-- ✅ External link with .link class --><span> Read more in our <a href="https://docs.deploystack.io" target="_blank" class="link">documentation</a>.</span><!-- ✅ Unstyled link (default behavior) --><a href="/dashboard">Dashboard</a><!-- ✅ Button-styled link (no .link class needed) --><a href="/signup" class="rounded-md bg-primary px-4 py-2 text-white">Sign Up</a>
When to Use .link
Use Case
Use .link?
Inline text links in paragraphs
✅ Yes
Documentation/help links
✅ Yes
External links
✅ Yes
Navigation menu items
❌ No
Button-styled links
❌ No
Sidebar/header links
❌ No
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:
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.
<AlertDialog :open="isOpen" @update:open="(value) => isOpen = value"> <AlertDialogContent> <AlertDialogHeader> <AlertDialogTitle>Are you sure?</AlertDialogTitle> <AlertDialogDescription> This action cannot be undone. </AlertDialogDescription> </AlertDialogHeader> <AlertDialogFooter> <AlertDialogCancel>Cancel</AlertDialogCancel> <AlertDialogAction @click="handleConfirm"> Continue </AlertDialogAction> </AlertDialogFooter> </AlertDialogContent></AlertDialog>
When to Use AlertDialog
Delete confirmations
Enable/disable toggles
Destructive actions that cannot be undone
Any action requiring explicit user confirmation
Extracting Reusable Dialogs
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
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.
<script setup lang="ts">import { Skeleton } from '@/components/ui/skeleton'</script><template> <!-- Loading state mimics actual content structure --> <div v-if="isLoading" class="space-y-4"> <Skeleton class="h-4 w-64" /> <!-- Title placeholder --> <Skeleton class="h-4 w-48" /> <!-- Subtitle placeholder --> <div class="flex gap-2"> <Skeleton class="h-10 w-10 rounded" /> <!-- Icon placeholder --> <Skeleton class="h-10 w-full" /> <!-- Content placeholder --> </div> </div> <!-- Actual content --> <div v-else> <!-- Real content here --> </div></template>
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
Button Actions → Use Spinner
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.
<Button :loading="isSubmitting" loading-text="Saving..."> Save Changes</Button>
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
Aspect
Skeleton
Spinner
User expectation
Shows content shape
Shows “something is happening”
Layout shift
Minimal (matches content)
Can cause layout shift
Perceived speed
Feels faster
Can feel slower
Use case
Content loading
Action processing
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
<script setup lang="ts">import { Empty, EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription } from '@/components/ui/empty'import { Package } from 'lucide-vue-next'</script><template> <Empty v-if="!hasData"> <EmptyHeader> <EmptyMedia variant="icon"> <Package /> </EmptyMedia> <EmptyTitle>No data found</EmptyTitle> <EmptyDescription> There is currently no data to display. </EmptyDescription> </EmptyHeader> </Empty></template>
Empty State with Actions
<script setup lang="ts">import { Empty, EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription, EmptyContent } from '@/components/ui/empty'import { Button } from '@/components/ui/button'import { Package, Plus } from 'lucide-vue-next'</script><template> <Empty v-if="!hasData"> <EmptyHeader> <EmptyMedia variant="icon"> <Package /> </EmptyMedia> <EmptyTitle>No items found</EmptyTitle> <EmptyDescription> Get started by creating your first item. </EmptyDescription> </EmptyHeader> <EmptyContent> <Button @click="handleCreate"> <Plus class="h-4 w-4 mr-2" /> Create Item </Button> </EmptyContent> </Empty></template>
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
Button Patterns
Loading States
Buttons now include built-in loading state functionality. For comprehensive loading button documentation, see the Button Loading States Guide.
<!-- Button with loading state --><Button :loading="isSubmitting" loading-text="Saving..." @click="handleSave"> Save Changes</Button>