| title | Design System |
|---|---|
| description | Internal guide for documentation styling and component usage |
This guide documents the styling conventions and component patterns used throughout our documentation.
The docs use WebMCP's blue primary color.
**Primary**
Brand blue - primary actions, links, highlights
**Light**
Lighter variant - hover states, accents
**Dark**
Darker variant - active states, depth
| Element | Font | Weight |
|---|---|---|
| Headings | System sans-serif | 600 (semibold) |
| Body | System sans-serif | 400 (regular) |
| Code | System monospace | 400 (regular) |
Use callouts to highlight important information:
Use for supplementary information that enhances understanding. ```jsx Your message here ``` Use for cautionary information that could prevent issues. ```jsx Your message here ``` Use for best practices and helpful suggestions. ```jsx Your message here ``` Use for success states or confirmation messages. ```jsx Your message here ```Use cards for navigation and feature highlights:
Simple card with icon and description. Card that links to another page.<Card title="Title" icon="icon-name" href="/quickstart">
Card content here
</Card>Use steps for sequential procedures:
Describe what the user needs to do. Continue with the next action. Complete the procedure.<Steps>
<Step title="Step Title">
Step content
</Step>
</Steps>Always specify the language for syntax highlighting:
// TypeScript example
navigator.modelContext.registerTool({
name: 'example_tool',
description: 'An example tool',
inputSchema: { type: 'object', properties: {} },
handler: async () => ({ content: [{ type: 'text', text: 'Hello' }] })
});# Shell commands
npm install @mcp-b/globalfunction MyComponent() {
useWebMCP({
name: 'my_tool',
description: 'Does something',
handler: async () => ({ content: [{ type: 'text', text: 'Done' }] })
});
}
```
onMounted(() => {
navigator.modelContext.registerTool({
name: 'my_tool',
description: 'Does something',
handler: async () => ({ content: [{ type: 'text', text: 'Done' }] })
});
});
</script>
```
Import reusable content from the /snippets folder:
<Snippet file="snippets/webmcp-polyfill-setup.jsx" />Every page should include proper frontmatter:
---
title: Page Title
description: Brief description for SEO and navigation
icon: optional-icon-name
---- Be concise: Get to the point quickly
- Use active voice: "Register a tool" not "A tool can be registered"
- Provide examples: Show code before explaining it
- Link liberally: Cross-reference related content
- Test code: Ensure all examples work
- Follow Diataxis: Don't mix tutorials, how-tos, explanations, and reference