Project: Credence-Frontend
Pattern: Hybrid Responsive Navigation
Purpose: Design-to-code mapping for mobile navigation components
π Credence Design System
π Navigation
π Mobile
π¨ Hamburger Button
βββ Default
βββ Hover
βββ Active
βββ Focus
βββ Disabled
π¨ Drawer
βββ Closed (hidden)
βββ Open
βββ Header (close button)
βββ Navigation Links
βββ Footer (optional)
π¨ Backdrop
βββ Semi-transparent overlay
π¨ Navigation Link (Mobile)
βββ Default
βββ Hover
βββ Active (current page)
βββ Focus
π Desktop
π¨ Horizontal Nav (existing)
π¨ Navigation Link (Desktop)
βββ Default
βββ Hover
βββ Active
βββ Focus
Touch Target: 44Γ44px (WCAG 2.5.5 minimum)
Icon Size: 24Γ24px
Border Radius: 8px
| State | Background | Icon Color | Transform | Outline |
|---|---|---|---|---|
| Default | transparent |
var(--text-primary) |
scale(1) |
None |
| Hover | var(--bg-page) |
var(--text-primary) |
scale(1) |
None |
| Active | var(--bg-page) |
var(--text-primary) |
scale(0.95) |
None |
| Focus | transparent |
var(--text-primary) |
scale(1) |
2px solid var(--color-primary) |
Type: Three horizontal lines
Line Width: 2px
Line Height: 2px
Line Spacing: 5px
Color: var(--text-primary)
SVG Export:
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M3 12h18M3 6h18M3 18h18"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"/>
</svg>Width: 280px
Max Width: 70vw (responsive)
Height: 100vh (full viewport)
Position: Fixed, left: 0, top: 0
Z-index: 1000
Background: var(--bg-card)
Border Right: 1px solid var(--border-default)
Box Shadow: 4px 0 12px rgba(0, 0, 0, 0.15)
Overflow Y: auto (scrollable if content exceeds viewport)
Property: transform
Duration: 300ms
Easing: ease-in-out
From: translateX(-100%) (hidden off-screen)
To: translateX(0) (visible on-screen)
βββββββββββββββββββββββββββ
β Header (Close Button) β β 60px height
βββββββββββββββββββββββββββ€
β β
β Navigation Links β β Scrollable area
β β
β β
βββββββββββββββββββββββββββ
Height: 60px
Padding: 16px
Border Bottom: 1px solid var(--border-default)
Touch Target: 44Γ44px
Icon Size: 24Γ24px
Border Radius: 8px
Position: Right-aligned
| State | Background | Icon Color | Outline |
|---|---|---|---|
| Default | transparent |
var(--text-primary) |
None |
| Hover | var(--bg-page) |
var(--text-primary) |
None |
| Focus | transparent |
var(--text-primary) |
2px solid var(--color-primary) |
Padding: 12px 16px
Margin Bottom: 4px
Border Radius: 8px
Font Size: 16px
Font Weight: 600
Line Height: 1.5
Display: flex
Align Items: center
Gap: 12px
[Icon] [Label]
20px 16px
| State | Background | Text Color | Icon Color |
|---|---|---|---|
| Default | transparent |
var(--text-primary) |
var(--text-primary) |
| Hover | var(--bg-page) |
var(--text-primary) |
var(--text-primary) |
| Active | var(--color-primary) |
white |
white |
| Focus | transparent |
var(--text-primary) |
2px solid var(--color-primary) |
Size: 20Γ20px
Type: Emoji or SVG
Examples:
π Home
π Bond
β Trust Score
Width: 100vw
Height: 100vh
Position: Fixed, inset: 0
Z-index: 999 (below drawer)
Background: rgba(0, 0, 0, 0.5)
Backdrop Filter: blur(2px) (optional, for modern browsers)
Property: opacity
Duration: 300ms
Easing: ease-in-out
From: opacity 0
To: opacity 1
Display: flex
Gap: 16px (1rem)
Align Items: center
Padding: 8px 16px (0.5rem 1rem)
Font Size: 16px
Font Weight: 500 (default), 600 (active)
Border Radius: 8px
| State | Background | Text Color | Font Weight |
|---|---|---|---|
| Default | transparent |
var(--text-primary) |
500 |
| Hover | var(--bg-page) |
var(--text-primary) |
500 |
| Active | transparent |
var(--color-primary) |
600 |
| Focus | transparent |
var(--text-primary) |
500, outline |
{
"mobile-nav": {
"drawer-width": "280px",
"drawer-max-width": "70vw",
"drawer-padding": "24px 16px",
"header-height": "60px",
"header-padding": "16px",
"link-padding": "12px 16px",
"link-margin": "4px",
"link-gap": "12px"
},
"touch-targets": {
"minimum-size": "44px",
"icon-size": "24px",
"mobile-icon-size": "20px"
}
}{
"navigation": {
"backdrop": "rgba(0, 0, 0, 0.5)",
"drawer-bg": "var(--bg-card)",
"drawer-border": "var(--border-default)",
"drawer-shadow": "rgba(0, 0, 0, 0.15)",
"link-default": "var(--text-primary)",
"link-hover-bg": "var(--bg-page)",
"link-active-bg": "var(--color-primary)",
"link-active-text": "white",
"focus-outline": "var(--color-primary)"
}
}{
"navigation": {
"drawer-duration": "300ms",
"drawer-easing": "ease-in-out",
"backdrop-duration": "300ms",
"backdrop-easing": "ease-in-out",
"hover-duration": "150ms",
"hover-easing": "ease"
}
}{
"navigation": {
"mobile-link-size": "16px",
"mobile-link-weight": "600",
"mobile-link-line-height": "1.5",
"desktop-link-size": "16px",
"desktop-link-weight": "500",
"desktop-link-weight-active": "600"
}
}{
"navigation": {
"backdrop": "999",
"drawer": "1000"
}
}Show: Hamburger button + drawer
Hide: Desktop horizontal nav
Drawer Width: 280px (max 70vw)
Show: Desktop horizontal nav
Hide: Hamburger button + drawer
Show: Desktop horizontal nav
Hide: Hamburger button + drawer
Properties:
State: Default | Hover | Active | Focus | DisabledTheme: Light | Dark
Instances:
Hamburger/Default/Light
Hamburger/Hover/Light
Hamburger/Active/Light
Hamburger/Focus/Light
Hamburger/Default/Dark
Hamburger/Hover/Dark
...
Properties:
State: Closed | OpenTheme: Light | DarkContent: Home | Bond | Trust (active page)
Instances:
Drawer/Closed/Light
Drawer/Open/Light/Home-Active
Drawer/Open/Light/Bond-Active
Drawer/Open/Dark/Home-Active
...
Properties:
State: Default | Hover | Active | FocusTheme: Light | DarkIcon: Home | Bond | Trust | Custom
Instances:
NavLink-Mobile/Default/Light/Home
NavLink-Mobile/Hover/Light/Home
NavLink-Mobile/Active/Light/Home
NavLink-Mobile/Focus/Light/Home
...
| Figma Property | CSS Property | Value |
|---|---|---|
| Width | width |
44px |
| Height | height |
44px |
| Fill | background |
transparent |
| Border Radius | border-radius |
8px |
| Icon Color | color |
var(--text-primary) |
| Hover Fill | background:hover |
var(--bg-page) |
| Focus Outline | outline:focus-visible |
2px solid var(--color-primary) |
| Figma Property | CSS Property | Value |
|---|---|---|
| Width | width |
280px |
| Max Width | max-width |
70vw |
| Height | height |
100vh |
| Fill | background |
var(--bg-card) |
| Border Right | border-right |
1px solid var(--border-default) |
| Shadow | box-shadow |
4px 0 12px rgba(0,0,0,0.15) |
| Position | position |
fixed |
| Z-Index | z-index |
1000 |
| Figma Property | CSS Property | Value |
|---|---|---|
| Padding | padding |
12px 16px |
| Border Radius | border-radius |
8px |
| Font Size | font-size |
16px |
| Font Weight | font-weight |
600 |
| Text Color | color |
var(--text-primary) |
| Active Fill | background.active |
var(--color-primary) |
| Active Text | color.active |
white |
| Hover Fill | background:hover |
var(--bg-page) |
- Format: SVG (preferred) or PNG @2x/3x
- Size: 24Γ24px (hamburger), 20Γ20px (nav icons)
- Naming:
icon-hamburger.svg,icon-home.svg,icon-bond.svg - Color: Use
currentColorfor SVG fill/stroke
- Export: Figma Dev Mode (CSS, React)
- Naming: Match component file names (
MobileNav,DesktopNav) - Spacing: Export as CSS custom properties
- Format: PNG @2x (retina)
- Naming:
mobile-nav-closed.png,mobile-nav-open.png,desktop-nav.png - Annotations: Include spacing, colors, typography specs
Before handoff to development:
- Hamburger button has all states (default, hover, active, focus)
- Drawer has open/closed states
- Backdrop overlay specified
- Navigation links have all states
- Active page highlighted correctly
- Close button (β) designed
- Icons exported (SVG, 20Γ20px)
- Dark mode variants created
- Horizontal nav layout specified
- Navigation links have all states
- Active page highlighted
- Spacing between links defined
- Dark mode variants created
- Mobile breakpoint (< 640px) documented
- Desktop breakpoint (β₯ 640px) documented
- Transition between breakpoints smooth
- Touch targets β₯ 44Γ44px
- Focus outlines visible (2px, primary color)
- Color contrast β₯ 4.5:1 (WCAG AA)
- Active states distinguishable without color alone
- Spacing values documented
- Color values documented
- Typography values documented
- Animation values documented
- Z-index values documented
- All icons exported (SVG)
- Component specs exported (Figma Dev Mode)
- Screenshots exported (PNG @2x)
- Design tokens exported (JSON)
- Mobile Navigation Pattern
- Mobile Navigation Decision Matrix
- Figma Design Specs
- Accessibility Guidelines
Main Design File: [To be added]
Component Library: [To be added]
Mobile Nav Prototype: [To be added]
Design Tokens: [To be added]
Document Version: 1.0
Last Updated: 2026-04-29
Maintained By: Credence Design Team