fumadocs-component-docs

12
0
Source

Create component documentation with installation, usage examples, and preview sections. Apply when documenting 8-bit components with proper structure and examples.

Install

mkdir -p .claude/skills/fumadocs-component-docs && curl -L -o skill.zip "https://mcp.directory/api/skills/download/2717" && unzip -o skill.zip -d .claude/skills/fumadocs-component-docs && rm skill.zip

Installs to .claude/skills/fumadocs-component-docs

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

  1. Preview first - Show component before explaining
  2. Multiple variants - Demonstrate different prop combinations
  3. Realistic data - Use meaningful values in examples
  4. Import completeness - Include all used imports
  5. Code block labels - Use ```tsx for TypeScript
  6. 8-bit components - Import from @/components/ui/8bit/
  7. Consistent spacing - Use gap-4, p-4, mb-2 patterns

Reference Examples

  • content/docs/components/button.mdx - Simple component pattern
  • content/docs/components/health-bar.mdx - Variant demonstration
  • content/docs/components/sheet.mdx - Complex sub-component pattern

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.