fumadocs-component-docs
Formats documentation for 8-bit components using standardized previews.
Install
mkdir -p .claude/skills/fumadocs-component-docs && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2717" && unzip -o skill.zip -d .claude/skills/fumadocs-component-docs && rm skill.zipInstalls to .claude/skills/fumadocs-component-docs
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Create component documentation with installation, usage examples, and preview sections. Apply when documenting 8-bit components with proper structure and examples.Key capabilities
- →Structure component documentation with preview blocks
- →Define installation commands using copy buttons
- →Format component props using markdown tables
- →Demonstrate multiple component variants
- →Standardize import paths for 8-bit components
How it works
The pattern utilizes specific MDX components like ComponentPreview and CopyCommandButton to wrap code examples and installation instructions. It enforces a consistent layout including import blocks, props tables, and variant demonstrations.
Inputs & outputs
When to use fumadocs-component-docs
- →Documenting component libraries
- →Creating component preview blocks
- →Writing installation instructions for UI components
About this skill
Component Documentation Pattern
Create comprehensive documentation for 8-bit components following the standard structure.
Component Preview Structure
Wrap component examples in ComponentPreview with realistic data:
<ComponentPreview title="8-bit ComponentName component" name="component-name">
<div className="md:min-w-[300px] min-w-[200px] flex flex-col gap-8">
<div>
<p className="text-sm text-muted-foreground mb-2">
Description of first variant
</p>
<ComponentName prop={value} />
</div>
<div>
<p className="text-sm text-muted-foreground mb-2">
Description of second variant
</p>
<ComponentName prop={value} variant="retro" />
</div>
</div>
</ComponentPreview>
Simple Component Example
For basic components like Button:
<ComponentPreview title="8-bit button component" name="button">
<Button>Button</Button>
</ComponentPreview>
Complex Component Example
For components with multiple sub-components like Sheet:
<ComponentPreview title="8-bit Sheet component" name="sheet">
<Sheet>
<SheetTrigger asChild>
<Button variant="outline">Open</Button>
</SheetTrigger>
<SheetContent>
<SheetHeader>
<SheetTitle>Edit profile</SheetTitle>
<SheetDescription className="text-xs">
Make changes to your profile here.
</SheetDescription>
</SheetHeader>
<div className="p-4 flex flex-col gap-4">
<Label>Name</Label>
<Input placeholder="Project name" />
</div>
<SheetFooter className="flex-row-reverse">
<SheetClose asChild>
<Button size="sm">Save changes</Button>
</SheetClose>
</SheetFooter>
</SheetContent>
</Sheet>
</ComponentPreview>
Usage Section Pattern
Single import (simple components):
```tsx
import { Button } from "@/components/ui/8bit/button"
**Multiple imports** (complex components):
```mdx
```tsx
import {
Sheet,
SheetContent,
SheetDescription,
SheetHeader,
SheetTitle,
SheetTrigger,
} from "@/components/ui/8bit/sheet"
### Props Documentation
For components with props tables, use tables:
```mdx
### Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| variant | `string` | `"default"` | Visual style variant |
| size | `string` | `"default"` | Size of the button |
| asChild | `boolean` | `false` | Whether to merge props onto child |
Variant Examples
Show multiple variants in preview:
<ComponentPreview title="8-bit Health Bar component" name="health-bar">
<div className="md:min-w-[300px] min-w-[200px] flex flex-col gap-8">
<div>
<p className="text-sm text-muted-foreground mb-2">
Default health bar
</p>
<HealthBar value={75} />
</div>
<div>
<p className="text-sm text-muted-foreground mb-2">
Retro health bar
</p>
<HealthBar value={45} variant="retro" />
</div>
</div>
</ComponentPreview>
Copy Command Button
Place before ComponentPreview:
<div className="flex flex-col md:flex-row items-center justify-end gap-2 mb-2">
<CopyCommandButton
copyCommand="pnpm dlx shadcn@latest add @8bitcn/component-name"
command="pnpm dlx shadcn@latest add @8bitcn/component-name"
/>
</div>
Key Principles
- Preview first - Show component before explaining
- Multiple variants - Demonstrate different prop combinations
- Realistic data - Use meaningful values in examples
- Import completeness - Include all used imports
- Code block labels - Use ```tsx for TypeScript
- 8-bit components - Import from
@/components/ui/8bit/ - Consistent spacing - Use gap-4, p-4, mb-2 patterns
Reference Examples
content/docs/components/button.mdx- Simple component patterncontent/docs/components/health-bar.mdx- Variant demonstrationcontent/docs/components/sheet.mdx- Complex sub-component pattern
When not to use it
- →When documenting non-8-bit UI components
- →When avoiding MDX-based documentation frameworks
Prerequisites
Limitations
- →Restricted to the 8-bit component import structure
- →Requires specific MDX component availability
How it compares
This approach provides a predefined schema for component documentation that ensures consistent structure and interactive previews compared to manual markdown writing.
Compared to similar skills
fumadocs-component-docs side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| fumadocs-component-docs (this skill) | 4 | 6mo | No flags | Beginner |
| fumadocs-mdx-structure | 2 | 6mo | No flags | Beginner |
| docs-sandpack | 3 | 6mo | No flags | Beginner |
| 8bit-docs-patterns | 1 | 6mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by TheOrcDev
View all by TheOrcDev →You might also like
fumadocs-mdx-structure
TheOrcDev
Create MDX documentation files with proper frontmatter, imports, and component integration. Apply when creating or updating Fumadocs documentation pages in content/docs/.
docs-sandpack
reactjs
Use when adding interactive code examples to React docs.
8bit-docs-patterns
TheOrcDev
Create documentation with gaming-specific examples, retro styling, and 8-bit terminology. Apply when documenting gaming blocks, RPG components, or retro-styled UI elements.
docs-writer-reference
reactjs
Reference page structure, templates, and writing patterns for src/content/reference/. For components, see /docs-components. For code examples, see /docs-sandpack.
update-component-docs
AgnosticUI
Update component documentation when code changes
writing-registry-meta
siriwatknp
Use this skill when writing meta file for MUI Treasury registry.