Workflow Documentation

Document a Component

Workflow for writing component documentation with examples

documentationcomponentsfrontend
CLAUDE.md

When documenting a component:

  1. Start with a one-line description of what the component does and when to use it.
  2. List all props with their types, default values, and descriptions.
  3. Provide a basic usage example showing the most common configuration.
  4. Provide examples for common variants: different sizes, states, or configurations.
  5. Document any events or callbacks the component emits.
  6. Note accessibility features: keyboard interactions, ARIA attributes, screen reader behavior.
  7. List do’s and don’ts: common patterns to follow and anti-patterns to avoid.

Copy this workflow into your CLAUDE.md or agent config file so your agent follows this process automatically.

get crystl