component-docs
Installation
SKILL.md
Component Docs (Docusaurus + MDX)
Author/maintain docs for the shared component library on the Docusaurus site at
packages/insomnia-component-docs. Docs are one MDX file per component with live,
editable examples.
When to Use
- A new component was added to
packages/insomnia/src/basic-components/(or migrated in). - A component's props/variants/styling changed and its doc needs updating.
- Asked to "document" / "write docs for" / "update docs for" a component.
Key Facts (read before editing)
- One file per component:
packages/insomnia-component-docs/docs/Components/<name>.mdx(kebab-case filename). - Sidebar is autogenerated from the folder — do NOT edit
sidebars.ts. Just setsidebar_positionin frontmatter for ordering. - Live examples use
```tsx livefenced blocks (via@docusaurus/theme-live-codeblock). Component names in those blocks resolve from a shared scope, NOT from imports in the MDX. - ⚠️ The easy-to-forget step: any component used in a
tsx liveblock MUST be imported and registered inpackages/insomnia-component-docs/src/theme/ReactLiveScope/index.ts. If it isn't, the live block fails to compile. Library components import asinsomnia/src/basic-components/<name>.