IntelliPen Design System¶
Overview¶
IntelliPen uses a modern, Chrome-inspired design system based on Material Design 3 principles. This document outlines the design tokens, components, and patterns used throughout the extension.
Design Philosophy¶
- Chrome-Native: Follows Google Chrome's design language for seamless integration
- Material Design 3: Implements the latest Material Design principles
- Accessibility First: WCAG 2.1 AA compliant with proper contrast ratios
- Performance: Optimized animations and transitions
- Consistency: Unified design tokens across all components
Design Tokens¶
Color Palette¶
Primary Colors (Chrome Blue)¶
--color-primary-50: #e8f0fe; /* Lightest */
--color-primary-600: #4285f4; /* Main brand color */
--color-primary-700: #1967d2; /* Hover states */
Neutral Colors (Chrome Gray Scale)¶
--color-neutral-0: #ffffff; /* Pure white */
--color-neutral-50: #f8f9fa; /* Backgrounds */
--color-neutral-200: #e8eaed; /* Borders */
--color-neutral-700: #5f6368; /* Body text */
--color-neutral-900: #202124; /* Headings */
Semantic Colors¶
--color-success: #1e8e3e; /* Success states */
--color-warning: #f9ab00; /* Warning states */
--color-error: #d93025; /* Error states */
--color-info: #1967d2; /* Info states */
Typography¶
Font Family¶
--font-family: 'Google Sans', 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
--font-family-mono: 'Google Sans Mono', 'Roboto Mono', 'Courier New', monospace;
Font Sizes¶
--text-xs: 11px; /* Small labels */
--text-sm: 12px; /* Secondary text */
--text-base: 13px; /* Body text */
--text-md: 14px; /* Primary text */
--text-lg: 16px; /* Subheadings */
--text-xl: 18px; /* Headings */
Font Weights¶
Spacing Scale¶
Based on 4px increments:
Border Radius¶
--radius-sm: 4px; /* Small elements */
--radius-md: 8px; /* Cards, inputs */
--radius-lg: 12px; /* Large cards */
--radius-full: 9999px; /* Pills, buttons */
Elevation (Shadows)¶
Chrome-style shadows for depth:
--elevation-1: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
--elevation-2: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
--elevation-3: 0 4px 8px 3px rgba(60, 64, 67, 0.15), 0 1px 3px rgba(60, 64, 67, 0.3);
Transitions¶
--transition-fast: 100ms cubic-bezier(0.4, 0.0, 0.2, 1);
--transition-base: 200ms cubic-bezier(0.4, 0.0, 0.2, 1);
--transition-slow: 300ms cubic-bezier(0.4, 0.0, 0.2, 1);
Components¶
Buttons¶
Primary Button¶
Secondary Button¶
Text Button¶
Icon Button¶
Inputs¶
Text Input¶
Select¶
Textarea¶
Cards¶
<div class="card">
<div class="card-header">
<h3>Card Title</h3>
</div>
<div class="card-body">
Card content goes here
</div>
<div class="card-footer">
<button class="btn btn-text">Cancel</button>
<button class="btn btn-primary">Save</button>
</div>
</div>
Badges¶
<span class="badge badge-primary">Primary</span>
<span class="badge badge-success">Success</span>
<span class="badge badge-warning">Warning</span>
<span class="badge badge-error">Error</span>
Toast Notifications¶
<div class="toast success">
<span class="toast-icon">✓</span>
<div class="toast-content">
<div class="toast-title">Success</div>
<div class="toast-message">Your changes have been saved.</div>
</div>
</div>
Icons¶
IntelliPen uses a custom icon library based on Material Symbols. All icons follow these principles:
- ViewBox: 0 0 24 24 (consistent)
- Stroke Width: 2px (primary), 1.5px (secondary)
- Stroke Linecap: round
- Stroke Linejoin: round
- Fill: currentColor (inherits text color)
Using Icons¶
import { createIcon, getIconHTML } from './src/icons/icon-library.js';
// Create icon element
const icon = createIcon('pen', { size: 20, color: '#4285f4' });
// Get icon HTML
const html = getIconHTML('sparkle', { size: 24 });
Available Icons¶
pen- Edit/Writesparkle- AI/Magicgrammar- Grammar checkrewrite- Improve writingtranslate- Translationsummarize- Summarizationmicrophone- Recordingspeaker- Audio outputdocument- Filefolder- Foldersave- Savedelete- Deletecopy- Copycheck- Successclose- Closesettings- Settingsinfo- Informationwarning- Warninglock- Privacylanguage- Languagerefresh- Refreshexport- Exportplay- Playstop- Stoprecord- Recordundo- Undoredo- Redomenu- Menusearch- Searchsidebar- Sidebartab- Tab
Layout Patterns¶
Popup Menu¶
<div class="menu-container">
<div class="menu-header">
<!-- Logo and branding -->
</div>
<div class="menu-items">
<!-- Menu items -->
</div>
<div class="menu-footer">
<!-- Status and settings -->
</div>
</div>
Sidepanel¶
<div class="sidepanel-container">
<header class="sidepanel-header">
<!-- Title and controls -->
</header>
<nav class="navigation-tabs">
<!-- Tab navigation -->
</nav>
<div class="screen">
<!-- Screen content -->
</div>
</div>
Toolbar¶
<div class="toolbar">
<div class="toolbar-group">
<button class="toolbar-btn">...</button>
<button class="toolbar-btn">...</button>
</div>
<div class="toolbar-divider"></div>
<div class="toolbar-group">
<button class="toolbar-btn">...</button>
</div>
</div>
Utility Classes¶
Display¶
Flexbox¶
.items-center, .items-start, .items-end
.justify-center, .justify-between, .justify-end
.flex-col, .flex-wrap, .flex-1
Spacing¶
Typography¶
.text-xs, .text-sm, .text-base, .text-md, .text-lg
.font-medium, .font-semibold, .font-bold
.text-primary, .text-secondary, .text-muted
Border Radius¶
Shadows¶
Animations¶
Predefined Animations¶
.animate-fadeIn /* Fade in */
.animate-slideUp /* Slide up */
.animate-slideDown /* Slide down */
.animate-scaleIn /* Scale in */
Custom Animations¶
@keyframes spin {
to { transform: rotate(360deg); }
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
Accessibility¶
Focus States¶
All interactive elements have visible focus indicators:
Color Contrast¶
All text meets WCAG 2.1 AA standards: - Body text: 4.5:1 minimum - Large text: 3:1 minimum - UI components: 3:1 minimum
Keyboard Navigation¶
All components support keyboard navigation: - Tab: Navigate between elements - Enter/Space: Activate buttons - Escape: Close modals/dialogs - Arrow keys: Navigate lists/menus
Best Practices¶
Do's¶
✓ Use design tokens for consistency ✓ Follow spacing scale (4px increments) ✓ Use semantic color names ✓ Implement proper focus states ✓ Test with keyboard navigation ✓ Ensure proper color contrast
Don'ts¶
✗ Don't use arbitrary values ✗ Don't skip focus indicators ✗ Don't use low-contrast colors ✗ Don't create custom animations without purpose ✗ Don't ignore accessibility guidelines
Migration Guide¶
From Old to New Design System¶
-
Update CSS imports:
-
Update class names:
-
Use design tokens:
-
Update icons: