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-infraThese 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.
These are React hooks that provide client-side functionality for building documentation sites.
Some fundamental hooks are:
useCode: A hook for rendering code blocksuseDemo: A hook for rendering demosuseTypes: A hook for extracting and displaying type informationSee the full list of hooks in the Hooks section.
These are utility functions that provide functionality outside of React components.
Some fundamental functions are:
abstractCreateDemo - Factory utilities for creating structured demos that work with CodeHighlighterabstractCreateTypes - Factory utilities for creating type documentation componentsloadPrecomputedCodeHighlighter - Webpack loader for build-time demo optimizationtransformMarkdownCode - Remark plugin for transforming markdown code blocks with variants into HTML structuresloadPrecomputedTypesMeta - Webpack loader for build-time type extraction and analysistransformMarkdownRelativePaths - Remark plugin for transforming relative markdown links to absolute pathsSee the full list of functions in the Functions section.
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.
If you want to contribute to the MUI Docs Infra project, please read the Contributing guide.
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.