Skip to main content
Brand and assetsBuild
Monitor and contribute
  • Component health
/
Monitor and contribute
  • Component health
  • Contribution
    • How to contribute
    • Guides
    • For designers
    • For engineers
    • For documentation
    • Figma training
    • Reference
    • Component page template
    • Component lifecycle
    • Naming conventions
    • Component thumbnails
  • Contribution
  • Component page template

Component page template

Every component page has the same sections, in the same order, so people and agents find things in the same place. Start from templates/component.mdx.template.

  • Generated sections come from the component source, so they can't drift from the code. Fix them in the source, not in the MDX.
  • Authored sections are H2s with a fixed heading id, e.g. ## Use cases {/* #use-cases */}. The label can change, the id can't.
  • Put other headings as H3s inside a section, e.g. one H3 per example under examples.
  • Each authored section shows in the Design or Technical tab, according to its id. Write them in table order: Design sections first.
  • The Component health page shows which required sections each page is missing.
SectionTabRequiredHeadingContent
ThumbnailAbove the tabs✅Generatedstatic/img/thumbnails/<Name>.png, shown in the components list.
Name and descriptionAbove the tabs✅GeneratedTSDoc summary of the component, or description in frontmatter.
Status and replacementsAbove the tabs✅GeneratedTSDoc @alpha, @beta or @deprecated with @replacement tags. Stable when untagged, missing when deprecated without a replacement.
ExampleDesign✅## Example {/* #basic-example */}A <Demo> of the component in its most common use, without a live editor.
Use casesDesign✅## Use cases {/* #use-cases */}A <UseCases> block with <WhenToUse> and <WhenNotToUse> lists, then ### Alternatives with an <Alternative> card per component to pick instead.
VisualsDesignOptional## Visuals {/* #visuals */}Anatomy, variants and sizes. Skip for purely technical components.
StatesDesignOptional## States {/* #states */}One H3 and <Demo> per state: default, filled, error, disabled, read-only...
Responsive behaviorDesignOptional## Responsive behavior {/* #responsive */}How the component adapts across breakpoints or platforms.
PlaygroundTechnical✅## Playground {/* #playground */}A jsx live code block setting the most used props, except sx.
Do's and don'tsTechnical✅## Do's and don'ts {/* #dos-and-donts */}A <DoDont> block.
AccessibilityTechnicalOptional## Accessibility {/* #accessibility */}What the consumer must provide (labels, aria-* props) and links to the relevant WCAG criteria. Compliance status stays in the accessibility frontmatter.
Usage examplesTechnical✅## Usage examples {/* #examples */}Implementation examples, with at least one <Demo> or code block.
PropsProps✅GeneratedProps tab generated from source. Present when every prop has a TSDoc description.
Style APIPropsOptionalGeneratedAccepted sx keys, listed in the Props tab from the sx prop type. Put any guidance in the TSDoc of the sx prop.
Edit this page
Previous
Figma training
Next
Component lifecycle