tpmjs design system The comprehensive design system for TPMJS. This guide covers design principles, foundations, components, and governance rules that scale across teams, AI agents, and external contributors.
table of contents Foundations
Design Principles Color System Typography Spacing Motion Systems
Accessibility Layout Content Data Visualization Iconography Implementation
Theming Components Component APIs Patterns
Navigation Forms Feedback Tables Search & Filtering Governance
A11y Checklists Content & Writing Icon System 1. design principles These principles guide every design decision in TPMJS. They ensure consistency and prevent drift as the system grows.
Every element serves a purpose. Remove anything that doesn't help users accomplish their goals. Developer tools should feel efficient, not playful.
Sharp corners communicate precision and control. Tools feel engineered, not organic. The interface should feel like a well-built instrument.
The copper accent (#A6592D) indicates interactivity and importance. It's the 'hot metal' that draws attention to actions and key information.
Reduce cognitive load through breathing room. Dense interfaces slow users down. Space creates hierarchy and improves scanability.
WCAG AA compliance is the minimum. Focus states are never removed. Color is never the only indicator of meaning.
The system is built for developers using developer tools. Technical accuracy over marketing speak. Show don't tell.
design philosophy TPMJS is a developer platform for AI tools. The design reflects this through industrial aesthetics: sharp edges, technical typography, and a muted palette with copper as the signal color.
Unlike consumer products that aim for delight, TPMJS aims for efficiency and trust . Users should feel confident that the interface will behave predictably and help them accomplish tasks quickly.
2. color system A warm earthy palette with copper accent. Colors are designed for clarity, hierarchy, and accessibility.
backgrounds surface
#FFFFFF
cards, panels
surface-2
#FAF8F6
elevated surfaces
surface-3
#F0EDEA
highest elevation
borders border
#CEC9C3
default borders
border-strong
#857F77
emphasized borders
border-subtle
#E3E0DC
subtle borders
text text-secondary
#5C564F
secondary text
text-tertiary
#817B74
tertiary text
text-muted
#9A958F
muted text
accent (copper) accent
#A6592D
brand accent
accent-strong
#8F4722
hover accent
accent-muted
#EDE5DF
soft tint
status success
#327D52
success states
warning
#D9A020
warning states
status (light backgrounds) success-light
#E5F3EC
success bg
warning-light
#F8F2E0
warning bg
error-light
#F9EDED
error bg
color usage rules when to use copper vs neutral • Copper: Primary actions, active states, links, key metrics • Neutral: Secondary actions, borders, backgrounds, body text • Rule: Copper should be max ~10% of visible screen area semantic color priority error
> warning
> success
> info
When multiple states apply, show the highest priority color.
Use copper for primary CTAs
Don't use copper for everything
Use status colors with meaning
Don't use colors decoratively
contrast ratios (wcag aa) combination ratio normal text large text foreground / background 12.5:1 pass
pass
accent / background 5.2:1 pass
pass
foreground-secondary / background 5.8:1 pass
pass
foreground-tertiary / background 3.9:1 large only
pass
3. typography Two font families create clear hierarchy: monospace for headings and technical content, sans-serif for body text and descriptions.
font families JetBrains Mono
--font-mono
Used for: headings, code, data, labels, technical content
Inter
--font-sans
Used for: body text, descriptions, long-form content
type scale --text-xs12px / 0.75rem Aa
--text-sm14px / 0.875rem Aa
--text-lg18px / 1.125rem Aa
--text-xl20px / 1.25rem Aa
--text-2xl24px / 1.5rem Aa
--text-4xl40px / 2.5rem Aa
max line width --prose-width-narrow45ch
--prose-width65ch (default)
--prose-width-wide80ch
This paragraph is constrained to 65 characters per line, the optimal width for reading comprehension. Lines that are too long cause eye fatigue, while lines that are too short disrupt reading rhythm.
usage rules monospace (JetBrains Mono) • Page titles and section headings • Code snippets and technical content • Data values, metrics, timestamps • Form labels and button text • Table headers and numeric columns sans-serif (Inter) • Body paragraphs and descriptions • Help text and instructions • Error messages and notifications • Marketing and explanatory content • Long-form documentation heading hierarchy
heading 1 (48px) heading 2 (40px) heading 3 (32px) heading 4 (24px) heading 5 (20px) heading 6 (18px) 4. spacing Consistent spacing creates visual rhythm. Use the 4px base unit and generous whitespace for clarity.
semantic spacing --spacing-tight16px (4)
--spacing-element32px (8)
--spacing-comfortable48px (12)
--spacing-component64px (16)
--spacing-section128px (32)
5. motion Motion communicates state changes, not decoration. Animations are fast by default and respect user preferences.
motion principles fast by default Most transitions complete in 150-200ms. Users should never wait for animations to finish before interacting.
state communication Motion indicates something changed: a panel opened, an item was selected, data updated. Never animate just for visual interest.
linear for data Data updates (counters, progress bars, charts) use linear easing. This feels more precise and mechanical.
respect preferences Honor prefers-reduced-motion. All animations disable when the user has requested reduced motion.
easing tokens --easing-standardcubic-bezier(0.4, 0, 0.2, 1)
--easing-deceleratecubic-bezier(0, 0, 0.2, 1)
--easing-acceleratecubic-bezier(0.4, 0, 1, 1)
--easing-linearlinear
--easing-springcubic-bezier(0.175, 0.885, 0.32, 1.275)
interactive demo fast (150ms) base (200ms) slow (300ms)
6. accessibility TPMJS targets WCAG 2.1 AA compliance. Accessibility is not optional—it's a core requirement for every component.
focus management keyboard navigation • Tab moves focus forward through interactive elements • Shift+Tab moves focus backward • Enter / Space activates buttons and links • Esc closes modals and dropdowns • Arrow keys navigate within components (tabs, radios, menus) color independence Use icons + color for states
Don't rely on color alone
screen reader support • All interactive elements have accessible names (aria-label or visible text) • Images include alt text describing content • Form inputs are associated with labels • Error messages are announced via aria-live regions • Loading states communicate progress to screen readers • Decorative elements are hidden from assistive technology 7. layout & responsiveness Mobile-first responsive design with clear breakpoints and density modes for different use cases.
breakpoints responsive behaviors • Sidebar: Collapsible on mobile, visible on lg+ • Tables: Horizontal scroll on mobile, full width on lg+ • Cards: Single column on mobile, grid on md+ • Navigation: Hamburger menu on mobile, horizontal on lg+ density modes Density modes adjust spacing, font size, and row heights for different contexts. Essential for data-dense developer tools.
compact comfortable spacious
name downloads status @tpmjs/parser 125,432 active
@tpmjs/validator 89,231 active
@tpmjs/transform 45,678 beta
grid system sidebar + content (3 + 9)
8. content guidelines Voice and tone guidelines for consistent, helpful communication across the platform.
voice & tone we are • Technical: Precise, accurate, developer-friendly • Direct: Say what needs to be said, no fluff • Helpful: Guide users to success • Neutral: Professional, not corporate we are not • Marketing-speak: No "revolutionary" or "game-changing" • Cute: No jokes, puns, or playful language • Vague: No "something went wrong" • Condescending: No "simply" or "just" microcopy rules Use action verbs for buttons
error message format Error messages should explain what happened and what to do next .
Good: "API key is invalid. Generate a new key in your dashboard settings."
Bad: "Error: Invalid credentials"
empty states no tools yet
Publish your first tool to get started.
publish tool no results found
Try adjusting your search or filters.
clear filters failed to load
Check your connection and try again.
retry loading states skeleton loading Use for content that will load quickly (<2s).
spinner loading Use for actions or longer operations.
9. data visualization Guidelines for charts, metrics, and data displays. Semantic colors only— no rainbow charts.
data color palette color rules for data • Use copper for primary/highlighted data series • Use grayscale for comparison and secondary series • Reserve semantic colors (success/warning/error) for threshold indicators • Create emphasis through opacity variation, not hue changes • Maximum 4 colors in any single visualization quality score visualization Tool quality scores use a consistent visual language across the platform.
progress indicators warning (approaching limit)
animated counters +1000 -1000 random
10. iconography Consistent icon usage for clear visual communication.
usage rules icon-only buttons Only allowed when the action is universally understood (close, search, menu) AND space is limited.
icon + label (preferred) Always include text labels when space permits for clarity.
11. theming Theme architecture and customization guidelines for consistent extension.
token architecture core
Raw values: HSL colors, pixel sizes, timing functions semantic
Named tokens: --primary, --background, --motion-fast component
Component-specific: button-bg, input-border, card-shadow /* Core tokens (don't override) */
--copper-500 : 22 57 % 41 % ;
/* Semantic tokens (safe to override) */
--primary : var ( --copper-500 ) ;
--primary-hover : 22 57 % 35 % ;
--accent : var ( --primary ) ;
/* Component tokens (for advanced customization) */
--button-bg : hsl ( var ( --primary ) ) ;
--button-hover-bg : hsl ( var ( --primary-hover ) ) ; dark mode Dark mode is opt-in via the .dark class on the root element. All semantic tokens have dark mode variants.
embedding guidance for sdk users embedding tpmjs ui • Import the CSS variables from @tpmjs/ui/styles • Override semantic tokens in your own CSS to match your brand • Do not override core tokens (raw values) • Test both light and dark modes if supporting theme switching • Use data-density attribute for density control 12. components Complete component catalog with all variants and states.
button variants
default secondary destructive outline outline dotted blueprint ghost link
states
normal disabled loading
badge variants
default
secondary
outline
success
error
warning
info
card default card card variant example
action
elevated card card variant example
action
outline card card variant example
action
blueprint card card variant example
action
featured card card variant example
action
brutalist card card variant example
action
accordion What is TPMJS? TPMJS is a tool package manager for JavaScript that helps you discover, publish, and use AI tools.
How do I publish a tool? Add the tpmjs keyword to your package.json and publish to npm. Your tool will be automatically discovered.
Is it free to use? Yes, TPMJS is free for open source tools. Enterprise features are available for private registries.
form elements select select option... Option 1 Option 2 Option 3 tabs all items 128 active 42 archived 86
table example data table name category downloads score @tpmjs/parser utility 125,432 0.92 @tpmjs/validator validation 89,231 0.87 @tpmjs/transform data 45,678 0.81
popover Open Popover
modal Open Modal
drawer Open Drawer state components empty state
No items yet Get started by creating your first item.
Create Item
error state
Something went wrong Failed to load data. Please try again.
Try Again page header Page Title This is a description of the page content.
stat card 0
Total Tools
+12% from last month
0K
Downloads
-3% from last month
install snippet npm pnpm yarn bun
npm install @tpmjs/example-tooltoast Show Toast Toast variants: default, success, error, warning, info
code block import { Button } from '@tpmjs/ui/Button/Button' ;
export function MyComponent ( ) {
return (
< Button variant = "default" >
click me
< / Button >
) ;
} 13. component apis Complete API documentation for each component with props, types, and usage examples.
button api prop type default description variant 'default' | 'secondary' | 'destructive' | 'outline' | 'ghost' | 'link' 'default' visual style size 'sm' | 'md' | 'lg' | 'icon' 'md' button size loading boolean false show spinner disabled boolean false disable interaction
// Basic usage
< Button > click me </ Button >
// With variant and size
< Button variant = " destructive " size = " lg " >
delete tool
</ Button >
// Loading state
< Button loading > publishing... </ Button >
// With icon
< Button >
< Icon icon = " plus " size = " sm " className = " mr-2 " />
add tool
</ Button > input api prop type default description state 'default' | 'error' | 'success' 'default' visual state size 'sm' | 'md' | 'lg' 'md' input size
// Basic usage
< Input placeholder = " enter text... " />
// With error state
< Input
state = " error "
placeholder = " invalid input "
/>
// With FormField wrapper
< FormField
label = " Email "
error = " Invalid email address "
>
< Input state = " error " />
</ FormField > anti-patterns don't do this // ❌ Using inline styles
< Button style = { { backgroundColor : 'red' } } >
delete
</ Button >
// ❌ Nesting buttons
< Button >
< Button > nested </ Button >
</ Button >
// ❌ Missing accessible name
< Button size = " icon " >
< Icon icon = " plus " />
</ Button > do this instead // ✅ Using variants
< Button variant = " destructive " >
delete
</ Button >
// ✅ Single button
< Button > action </ Button >
// ✅ With aria-label
< Button size = " icon " aria-label = " Add item " >
< Icon icon = " plus " />
</ Button > 14. navigation patterns Navigation patterns for consistent wayfinding across the platform. Each pattern has specific use cases and accessibility requirements.
global navigation (header) The primary header navigation appears on every page and provides access to main sections.
guidelines • Maximum 5-6 top-level items to avoid cognitive overload • Use visible active states (underline or background) • Logo always links to home • Auth actions stay in top-right corner sidebar navigation Vertical sidebar for section-level navigation within the app.
keyboard shortcuts [ collapse/expand sidebar
g then h go to home
g then t go to tools
g then s go to settings
breadcrumbs Show hierarchical location and enable navigation back to parent pages.
tab navigation For switching between views within a page context.
overview readme versions 24 dependencies 3
keyboard behavior • ← / → navigate between tabs • Home focus first tab • End focus last tab • Enter / Space activate focused tab mobile navigation Hamburger menu pattern for narrow viewports.
15. form patterns Consistent form patterns for data entry, validation, and submission. Forms should guide users through tasks with clear feedback.
validation timing Choose validation timing based on the field type and user expectations.
validate on blur Best for: format validation, required fields
validate on submit Best for: async validation, complex rules
error summary For forms with multiple errors, show a summary at the top.
description
Description must be at least 50 characters
help text placement Help text below the input
Don't put help text above
required vs optional when most fields are required
when most fields are optional
Rule: Mark the minority. If most fields are required, mark optional fields. If most are optional, mark required fields.
field grouping Group related fields with visual hierarchy.
danger zone Destructive actions require explicit confirmation.
delete this tool
Once deleted, this tool cannot be recovered.
delete tool transfer ownership
Transfer this tool to another user or organization.
transfer 16. feedback patterns Feedback patterns communicate status, progress, and system responses. Choose the right pattern based on context and urgency.
feedback decision tree Q1
Is this a page-level system message?
Yes → Use Banner (maintenance, outage, announcement)
Q2
Is it a response to a user action?
Yes → Use Toast (save, submit, delete confirmation)
Q3
Is it contextual to a specific element?
Yes → Use Inline Alert (form errors, field hints)
toast notifications Ephemeral messages that appear briefly and auto-dismiss.
tool published
@tpmjs/parser v1.0.0 is now live
publish failed
Package validation errors. Check your config.
api rate limit
You've used 90% of your monthly quota
new version available
Refresh to get the latest features
toast guidelines • Auto-dismiss after 5 seconds (except errors) • Errors should require manual dismissal • Stack from bottom-right, newest at bottom • Maximum 3 visible toasts at once inline alerts Persistent messages within content flow.
verification complete
Your email has been verified. You can now publish tools.
deprecated package
This package is deprecated. Consider migrating to @tpmjs/v2.
critical security issue
This version has known vulnerabilities. Update immediately.
update now global banners System-wide announcements that span the full width.
Scheduled maintenance: Jan 15, 2-4am UTC. Some services may be unavailable. Service degradation detected. Some API calls may fail. We are investigating. status page New: AI-powered code review is now available for all tools! learn more progress indicators For long-running operations, show determinate progress when possible.
determinate progress Use when you can calculate progress (file upload, batch processing).
indeterminate progress Use when duration is unknown (API calls, processing).
retry patterns When operations fail, provide clear retry options.
failed to load tools
We couldn't connect to the server. This could be a network issue or the service may be temporarily unavailable.
retry view details
17. table patterns Data table patterns for displaying, sorting, filtering, and acting on tabular data.
sortable columns Click column headers to sort. Show sort direction with icons.
category score @tpmjs/parser utility 125,432 0.92 @tpmjs/validator validation 89,231 0.87 @tpmjs/transform data 45,678 0.81
row selection + bulk actions Select rows to enable bulk actions. Show action bar when rows are selected.
name category status downloads @tpmjs/parser utility active
125,432 @tpmjs/validator validation active
89,231 @tpmjs/transform data beta
45,678 @tpmjs/executor runtime active
34,521 @tpmjs/config utility deprecated
23,456
pagination Use pagination for large datasets. Show page info and navigation.
simple pagination
Previous1 / 10 Next empty & loading states no tools found
Try adjusting your filters or create your first tool.
create tool density integration Tables respect the page density mode for compact views.
18. search & filtering Search and filter patterns help users find content quickly. Design for progressive disclosure and instant feedback.
search box states Search boxes should show clear states and provide helpful feedback.
no results
No results found
filter chips Use chips to show active filters with easy removal.
filter panel For complex filtering, use a dedicated panel with grouped options.
saved views Allow users to save and recall filter combinations.
my active tools deprecated packages 8 results
high-download tools 15 results
query syntax display For power users, display the underlying query syntax.
category: utility AND status: active AND downloads: >10000
Tip: Use this syntax directly in the search box for quick filtering.
command palette Quick access to search and navigation via keyboard shortcut.
↑↓ navigate↵ selectesc close
⌘K to open command palette
19. accessibility checklists Component-level accessibility requirements and implementation guides. All components follow WCAG 2.1 AA standards.
aria patterns & keyboard Each component has specific ARIA patterns and keyboard interactions that must be implemented.
overlay components component aria pattern focus trap keyboard reduced motion Modal dialogyes
Esc (close)
Tab (cycle focus)
Instant open/close Drawer dialogyes
Esc (close)
Tab (cycle focus)
No slide animation Popover dialogno
Esc (close)
Tab (move to next)
Instant show/hide Tooltip tooltipno
Focus trigger (show)
Blur (hide)
Instant show/hide DropdownMenu menuno
Enter/Space (select)
Arrow keys (navigate)
Esc (close)
Instant show/hide Toast alert / statusno
Focus action button
Enter (action)
No slide animation
form components component aria pattern focus trap keyboard reduced motion Input textboxno
N/A Select listboxno
Enter/Space (open)
Arrow keys (navigate)
Esc (close)
Instant show/hide Checkbox checkboxno
Space (toggle)
Tab (focus)
N/A Radio radiogroupno
Arrow keys (select)
Tab (focus)
N/A Switch switchno
Space (toggle)
Tab (focus)
Instant toggle Slider sliderno
Arrow keys (adjust)
Home/End (min/max)
N/A
navigation components component aria pattern focus trap keyboard reduced motion Tabs tablistno
Arrow keys (navigate)
Enter/Space (select)
Home/End (first/last)
N/A Breadcrumbs navigationno
Tab (focus links)
Enter (activate)
N/A Pagination navigationno
Tab (focus)
Enter (activate)
N/A Accordion regionno
Enter/Space (toggle)
Tab (focus)
Instant expand/collapse
focus management Proper focus management is critical for keyboard and screen reader users.
focus trap requiredModal dialogs - trap focus inside Drawer sheets - trap until closed Full-screen overlays focus restorationReturn focus to trigger on close Save and restore focus position Skip links for long content implementation pattern // Focus trap implementation
const dialogRef = useRef<HTMLDivElement>(null);
const triggerRef = useRef<HTMLButtonElement>(null);
// Save trigger reference before opening
const handleOpen = () => {
triggerRef.current = document.activeElement as HTMLButtonElement;
setOpen(true);
};
// Restore focus on close
const handleClose = () => {
setOpen(false);
triggerRef.current?.focus();
}; screen reader announcements Use live regions to announce dynamic content changes.
aria-live regions aria-live="polite"Toast notifications, status updates
aria-live="assertive"Error messages, critical alerts
role="status"Loading states, progress updates
component announcements event announcement Toast shown "[message content]" Modal opened "[dialog title], dialog" Form error "Error: [field name], [error message]" Loading complete "Loading complete, [N] results"
color contrast requirements All text must meet WCAG AA contrast requirements (4.5:1 for normal text, 3:1 for large text).
foreground on background 9.2:1
secondary on surface 5.8:1
contrast verification • Test all color combinations in both themes • Verify focus indicators (3:1 minimum) • Ensure error states meet requirements • Check interactive state contrast changes reduced motion support Respect the prefers-reduced-motion media query for users who experience motion sickness or vestibular disorders.
implementation // CSS approach
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}
// React hook approach
import { useReducedMotion } from '@tpmjs/ui/system/hooks/useReducedMotion';
function AnimatedComponent() {
const prefersReducedMotion = useReducedMotion();
return (
<div
className={prefersReducedMotion ? 'instant' : 'animated'}
/>
);
} always animate
Progress bars, loading spinners
respect preference
Page transitions, modal animations
never animate
Auto-playing video, parallax
testing checklist Before shipping any component, verify accessibility with these tests.
keyboard testing Tab through all interactive elements Verify focus is visible at all times Test Enter/Space activation Verify Escape closes overlays Test arrow key navigation screen reader testing Test with VoiceOver (macOS/iOS) Test with NVDA (Windows) Verify all content is announced Check landmark navigation Test live region updates20. content & writing Consistent language and terminology across the platform. These guidelines ensure clarity for users and maintainability for developers.
glossary Use these terms consistently throughout the platform.
term definition avoid Tool A reusable MCP server or utility that can be installed via npm Package, Module, Plugin Agent An AI-powered assistant that uses tools to complete tasks Bot, Assistant, AI Collection A curated group of related tools Bundle, Set, Kit Publish Release a new version to the registry Deploy, Ship, Push Install Add a tool to your project dependencies Download, Get, Add Execute Run a tool with specific parameters Invoke, Call, Trigger
verb consistency Use these verbs for common actions to maintain consistency.
action use avoid Remove permanently Delete
Remove, Erase, Destroy Remove from list Remove
Delete, Drop, Clear Cancel access Revoke
Remove, Delete, Cancel Make inactive Disable
Turn off, Deactivate Make active Enable
Turn on, Activate Start new Create
Add, New, Make Change existing Edit
Modify, Update, Change Look at details View
See, Show, Open
capitalization Follow these capitalization rules for UI text.
Lowercase for UI elements
create tool
view details
my collections
Avoid title case in buttons
Create Tool
View Details
My Collections
exceptions • Proper nouns: "GitHub", "Anthropic", "Claude" • Product names: "TPMJS", "MCP" • Start of sentences in paragraphs numbers & formatting Format numbers and data consistently.
numbers Small: 1, 42, 100
Large: 1,234
Abbreviated: 12.5k, 1.2M
dates Full: Jan 15, 2025
Relative: 2 hours ago
ISO: 2025-01-15
units Bytes: 2.4 MB
Duration: 3m 24s
Version: v1.2.3
error messages Write error messages that are helpful and actionable.
Helpful and specific
Invalid email format
Please enter a valid email address like user@example.com
Tool name already exists
Choose a different name or update the existing tool
21. icon system Icons from Lucide React, used consistently across components. All icons use 2px stroke weight and are available in multiple sizes.
icon library Source: Lucide React . Icons should be imported from @tpmjs/ui/Icon/Icon.
icon sizes Choose icon size based on context and surrounding content.
xs (12px)
Inline, tight spaces
md (20px)
Default, nav items
lg (24px)
Empty states, hero
icon usage guidelines When and how to use specific icons.
icon usage recommended size Success, completion, enabled sm-md
Close, cancel, remove, disabled sm-md
Error, critical issue sm-md
Warning, caution needed sm-md
Information, help sm-md
Loading, processing sm-md
Search input, find action sm
Edit, configuration sm-md
Navigate forward, expand xs-sm
Expand, dropdown xs-sm
Add, create new sm-md
More options menu sm
icon styling Consistent styling rules for icons in different contexts.
adding new icons Process for adding new icons to the system.
1. Check if a suitable icon exists in Lucide 2. Add the icon import to packages/ui/src/Icon/icons.ts3. Add the icon name to the IconName type4. Document the usage in this style guideexample: adding a new icon
// icons.ts
import { Heart } from 'lucide-react';
export const icons = {
// ...existing icons
heart: Heart,
};
export type IconName = keyof typeof icons; tpmjs design system v2.0
built with @tpmjs/ui • inspired by turbopuffer.com