MUI Docs Infra

Docs Infra

This is the documentation for the MUI Internal Docs Infra package. It provides components and utilities for building documentation sites.

You can install this package using:

pnpm install @mui/internal-docs-infra

Components

These usually do not add additional HTML elements to the page, but rather provide functionality to wrap developer provided components.

Some fundamental components are:

  • CodeHighlighter: A component for displaying and rendering code snippets with syntax highlighting.

See the full list of components in the Components section.

Hooks

These are React hooks that provide client-side functionality for building documentation sites.

Some fundamental hooks are:

  • useCode: A hook for rendering code blocks
  • useDemo: A hook for rendering demos
  • useTypes: A hook for extracting and displaying type information

See the full list of hooks in the Hooks section.

Functions

These are utility functions that provide functionality outside of React components.

Some fundamental functions are:

See the full list of functions in the Functions section.

Patterns

These are architectural patterns and best practices for building documentation infrastructure.

Some key patterns are:

  • Built Factories: A pattern for creating factory functions that use import.meta.url as a starting point for operations.
  • Props Context Layering: A pattern for creating isomorphic components with React Server Components using context layering.

See the full list of patterns in the Patterns section.

Contributing

If you want to contribute to the MUI Docs Infra project, please read the Contributing guide.

License & Use

This project is licensed under the MIT License.

This is an internal project, and is not intended for public use. No support or stability guarantees are provided. Use at your own risk.