MDN Template
The MDN template is a reference-style documentation design inspired by MDN Web Docs. It emphasizes clarity, generous whitespace, and intuitive navigation through breadcrumbs and a collapsible table of contents. Perfect for web standards, API references, and technical documentation.Design Overview
This template uses a clean, light theme with a distinctive 3px black border on the header and a colorful gradient progress bar. The design focuses on maximum readability with ample spacing and clear hierarchical structure.Key Visual Elements
- Color Palette: Pure white background with gray text (
gray-900) and blue accents - Layout: Collapsible sidebar (250px) with centered content (max-width: 64rem)
- Typography: Bold sans-serif headings with clear hierarchy
- Code Highlighting: VS (Visual Studio) light theme
- Progress Bar: Gradient from blue to pink tracking read position
Features
Reading Progress Bar
A top-edge gradient bar shows reading progress:Header Design
Top Bar
- Bold Bottom Border: 3px black line for visual weight
- Logo Positioning: Left-aligned with GitHub link
- Mobile Menu: Hamburger icon for responsive nav
- Clean Layout: Maximum 1200px width, centered
Breadcrumb Navigation
Secondary bar with contextual path:- Light gray background (
gray-50/80) - Subtle border separator
- Chevron icons between items
- Hover effects on clickable items
Sidebar Navigation
Collapsible “On this page” sidebar:- Hash Icons: Visual indicators for sections
- Active State: Blue background and bold text
- Smooth Animations: Fade-left entrance with staggered delays
- Minimal Width: 250px to maximize content space
Content Area
Title Block
Extrabold, large heading with metadata:- Tech stack badge
- Last updated date
- Section count
- 3px gradient accent rule
Quick Jump Chips
For documents with 4+ sections, shows first 8 as clickable pills:Code Blocks
Minimalist code presentation:- Language icon (Layers)
- Light gray header
- VS theme highlighting
- Rounded corners with shadow
Tables
Custom-styled tables:Use Cases
Perfect For
API References
Document web APIs, methods, and properties
Web Standards
HTML, CSS, JavaScript language references
Technical Specs
Protocol documentation and specifications
Library Docs
SDK and library reference materials
Not Ideal For
- Dark theme projects (use Twilio or DevTools)
- Minimalist branding (use Minimalist template)
- Academic papers (use AeroLaTeX)
Technical Implementation
Scroll Progress Calculation
Scroll Spy Implementation
Same Intersection Observer pattern as other templates:Markdown Enhancements
Inline Code
Pink accent color:Blockquotes
Blue left border:Animations
Two keyframe animations:fadeUp: Applied to title and sectionsfadeLeft: Applied to sidebar items
Customization Options
Progress Bar Colors
Modify the gradient:Accent Color
Update blue accents throughout:Layout Width
Typography
Adjust font weights and sizes:Browser Support
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
- Mobile browsers (responsive breakpoints)
Accessibility Features
- Keyboard Navigation: Full keyboard support
- Focus Indicators: Clear focus rings
- ARIA Labels: Proper labeling for screen readers
- Semantic HTML: Correct heading levels
- Color Contrast: Meets WCAG AA standards
- Responsive Text: Scales appropriately on mobile
Example Preview
A typical section renders:| Parameter | Type | Description |
|---|---|---|
| callback | Function | Function to call |
