Structured Data Display Pattern
This document establishes the mandatory pattern for displaying structured information throughout the DeployStack frontend. All structured data displays - whether read-only information or form layouts - must follow this consistent description list pattern.Design Principle
Every piece of structured information must use the same visual pattern: label on the left, content on the right, with consistent spacing and typography. This creates a cohesive, professional appearance across the entire application and eliminates visual inconsistency between different pages and components.The Mandatory Pattern
All structured data displays must use this HTML structure:Pattern Components
Element | Classes | Purpose |
---|---|---|
<dt> | text-sm/6 font-medium text-gray-900 | Field label (left column) |
<dd> | mt-1 text-sm/6 text-gray-700 sm:col-span-2 sm:mt-0 | Field content (right column) |
Container | px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 | Responsive grid layout |
List | divide-y divide-gray-100 | Visual separation between fields |
When to Use This Pattern
✅ Required For
- User profile information
- Server configuration details
- Installation information
- Settings pages
- Form layouts
- Team management displays
- Any structured data presentation
❌ Not Required For
- Simple text content
- Marketing pages
- Dashboard cards (unless showing structured data)
- Navigation elements
- Alerts and notifications
Implementation Examples
Read-Only Information Display
Form Input Layout
Complex Field Types
Switch/Toggle Fields
Tag Management Fields
File Upload Fields
Integration with ContentWrapper
When using this pattern within pages that require the ContentWrapper (tabbed content, detail pages), structure it like this:Typography and Spacing Standards
Label Typography (dt)
- Font size:
text-sm/6
(14px with 24px line-height) - Font weight:
font-medium
(500) - Color:
text-gray-900
(high contrast for readability)
Content Typography (dd)
- Font size:
text-sm/6
(14px with 24px line-height) - Font weight: Regular (400)
- Color:
text-gray-700
(slightly lighter than labels)
Description Text
- Font size:
text-xs
(12px) - Color:
text-muted-foreground
- Margin:
mt-1
(4px top margin)
Spacing
- Vertical padding:
py-6
(24px top and bottom) - Horizontal padding:
px-4
on mobile,px-0
on desktop - Grid gap:
sm:gap-4
(16px between columns)
Migration Guide
From Traditional Form Layout
Before (Traditional Form):Migration Steps
- Remove Label components - Labels become
<dt>
elements - Wrap in description list - Add
<dl>
container with dividers - Structure each field - Use the dt/dd grid pattern
- Update typography classes - Apply standard text classes
- Move descriptions - Place help text inside
<dd>
withmt-1
Accessibility Features
Semantic HTML
- Uses proper
<dl>
,<dt>
,<dd>
elements for screen readers - Maintains logical information hierarchy
- Preserves form labeling with
id
andfor
attributes
Keyboard Navigation
- All interactive elements remain keyboard accessible
- Tab order follows natural reading flow (left to right, top to bottom)
- Form validation and error states work normally
Screen Reader Support
Common Mistakes to Avoid
❌ Don’t Use for Non-Structured Content
❌ Don’t Inconsistent Typography
❌ Don’t Skip the Grid Layout
❌ Don’t Put Labels in dd
Best Practices
✅ Group Related Fields
Use section headers to organize related information:✅ Consistent Description Text
Keep help text concise and consistently formatted:✅ Handle Empty States
Show appropriate messages for missing data:Component Examples
For working examples of this pattern, see:- InstallationInfo.vue - Read-only information display
- BasicInfoStep.vue - Form layout implementation
- UserProfile.vue - Mixed content with badges and links
Related Documentation
- UI Design System - Overall design patterns and component guidelines
- ContentWrapper Pattern - Mandatory wrapper for tabbed content
- Form Design Patterns - Additional form styling guidelines
This structured data display pattern is mandatory for all new structured information displays and should be used when updating existing components to ensure visual consistency across the DeployStack frontend.