docs-sandpack

Create Sandpack-based interactive code examples for React documentation.

37|83|Updated Feb 13, 2019
One-click install
npx skills add https://github.com/reactjs/it.react.dev --skill docs-sandpack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docs-sandpack
Source: https://github.com/reactjs/it.react.dev/tree/main/.claude/skills/docs-sandpack
Command: npx skills add https://github.com/reactjs/it.react.dev --skill docs-sandpack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use when you want to embed consistent, interactive code examples in React docs using Sandpack patterns, enabling learners to experiment directly in the docs.

Core Features & Use Cases

  • Sandpack template quick-start snippets for MDX docs
  • Clear guidelines for file naming, line highlighting, and multi-file examples
  • Reusable patterns for active files and hidden content to illustrate concepts safely

Quick Start

Follow the Quick Start to incorporate a Sandpack-driven interactive example into your React documentation page.

Frequently Asked Questions about docs-sandpack

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add interactive code examples to React documentation?

You can embed interactive code examples in React docs using Sandpack patterns within MDX files, providing structured templates for single-file and multi-file examples. This allows learners to experiment directly in the documentation.

What is the best way to manage multi-file Sandpack examples in MDX?

Managing multi-file Sandpack examples in MDX involves using active files for visible code and hidden files for supporting content. This pattern ensures consistent, safe, and reusable documentation components across React docs.

How do I highlight specific lines in Sandpack code blocks for documentation?

Highlight specific lines in Sandpack code blocks by following established code style and line highlighting guidelines. This ensures consistent presentation of interactive code examples within your React documentation components.

Can I use Sandpack templates without external dependencies in React docs?

Yes, you can use Sandpack templates without external dependencies by following standardized dependency handling guidelines. This approach ensures safe, reusable, and consistent interactive code examples in your React documentation.

When do I need to use hidden files in interactive documentation examples?

Use hidden files in interactive documentation examples when you need to illustrate concepts safely without cluttering the learner's view. This pattern allows you to separate active visible code from supporting background content.