Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
bf91e75
First demo loaded into page
dav-is Feb 20, 2026
7d47d1b
Merge branch 'master' into docs-infra/migrate-demos
dav-is Feb 23, 2026
270ffcb
Add syntax theme
dav-is Feb 24, 2026
290e1c3
Fix live editing
dav-is Apr 27, 2026
8e077b9
Add eslint rule
dav-is Apr 27, 2026
2b615ae
Fix expand/collapse
dav-is Apr 27, 2026
3d69c84
Add demo export
dav-is Apr 27, 2026
900343e
Add reset focus
dav-is Apr 27, 2026
66e0de2
Improve indent handling
dav-is Apr 28, 2026
e90b3ab
Update theme
dav-is Apr 28, 2026
66b856d
bump docs-infra
dav-is Apr 28, 2026
f515075
Fix backspace bug
dav-is Apr 28, 2026
dd91265
bump docs-infra
dav-is Apr 28, 2026
df214d2
bump docs-infra
dav-is May 6, 2026
752c409
bump docs-infra
dav-is May 6, 2026
384de67
Add demo reset
dav-is May 6, 2026
30222ef
Add focus trap
dav-is May 6, 2026
86b5b15
Fix focus trap
dav-is May 6, 2026
0fad40f
Fix focus trap styles
dav-is May 6, 2026
5526095
bump docs-infra
dav-is May 6, 2026
cafc8db
bump docs-infra
dav-is May 6, 2026
b2866a2
bump docs-infra
dav-is May 6, 2026
4e1e4e3
Merge branch 'master' into docs-infra/migrate-demos
dav-is May 6, 2026
2c72829
Fix build
dav-is May 6, 2026
4e75a18
Fix CI
dav-is May 6, 2026
db69a5b
Move demo components to core-docs package
dav-is May 6, 2026
abbd2ad
Update css
dav-is May 7, 2026
d043c3f
Remove js
dav-is May 7, 2026
2256640
bump docs-infra
dav-is May 7, 2026
2338f0d
Merge branch 'master' into docs-infra/migrate-demos
dav-is May 7, 2026
6672736
bump docs-infra
dav-is May 7, 2026
139c509
Fix hover styles
dav-is May 7, 2026
e1f9ad8
bump docs-infra
dav-is May 8, 2026
8a1e380
bump docs-infra
dav-is May 8, 2026
acb0ae5
bump docs-infra
dav-is May 8, 2026
2b519b3
Merge branch 'master' into docs-infra/migrate-demos
dav-is May 8, 2026
65f0e00
Merge branch 'master' into docs-infra/migrate-demos
dav-is May 12, 2026
4ee34de
Add migration script
dav-is May 12, 2026
bb1e17d
Fix broken links checker
dav-is May 12, 2026
732f5ab
Migrate all demos
dav-is May 12, 2026
cda774b
Merge branch 'master' into docs-infra/migrate-demos
dav-is May 12, 2026
ca7992c
Add merge conflict script
dav-is May 12, 2026
2b54a8c
Remove ts -> js CI task
dav-is May 12, 2026
24b12e6
pnpm dedupe
dav-is May 12, 2026
62bad87
Fix regression test
dav-is May 12, 2026
7946115
Modify demo imports
dav-is May 12, 2026
b1f7cc5
prettier
dav-is May 12, 2026
016f973
Fix more regression tests
dav-is May 12, 2026
cea93aa
Add new syntax colors
dav-is May 12, 2026
c7f4f5e
Add another exclusion
dav-is May 12, 2026
a9e83fe
Shift demos list more
dav-is May 12, 2026
70e38d5
bump docs-infra
dav-is May 12, 2026
62f0e01
pnpm dedupe
dav-is May 13, 2026
894fdb9
Another try with argos
dav-is May 13, 2026
a897b3f
Fix screenshot names
dav-is May 13, 2026
74ef446
bump docs-infra
dav-is May 13, 2026
663dd75
Add back orphaned demos for screenshot testing
dav-is May 13, 2026
3323af8
pnpm dedupe
dav-is May 13, 2026
7676037
Add client files
dav-is May 13, 2026
33cb315
Fix type imports
dav-is May 13, 2026
49267e7
bump docs-infra
dav-is May 13, 2026
3f67f22
bump docs-infra
dav-is May 13, 2026
ffd9f09
Merge branch 'master' into docs-infra/migrate-demos
dav-is May 14, 2026
57b7f78
Merge branch 'master' into docs-infra/migrate-demos
dav-is May 18, 2026
a5b830c
add transforms
dav-is May 18, 2026
87d45c0
Merge branch 'master' into docs-infra/migrate-demos
dav-is May 19, 2026
7313826
Merge branch 'master' into docs-infra/migrate-demos
dav-is May 20, 2026
2f13722
Fully migrate demo component
dav-is May 20, 2026
dce3358
Finish migration
dav-is May 20, 2026
7bf7cbb
Lint
dav-is May 20, 2026
8180379
Use file:// URLs
dav-is May 20, 2026
95d0e72
Improve animation performance
dav-is May 21, 2026
af1775b
Merge branch 'master' into docs-infra/migrate-demos
dav-is May 21, 2026
4935374
Improve design differences
dav-is May 22, 2026
584f6f8
bump docs-infra
dav-is May 22, 2026
c7403d8
Merge branch 'docs-infra/migrate-demos' of github.com:dav-is/material…
dav-is May 22, 2026
9c5f525
bump docs-infra
dav-is May 23, 2026
149d9ec
bump docs-infra
dav-is May 27, 2026
61eb553
Merge branch 'master' into docs-infra/migrate-demos
dav-is May 27, 2026
e4d9382
Migrate demo
dav-is May 27, 2026
4eef195
Bump docs-infra
dav-is May 28, 2026
b4de07a
bump docs-infra
dav-is May 28, 2026
fc2b248
bump docs-infra
dav-is May 28, 2026
6e8076e
Bump docs-infra
dav-is May 28, 2026
6ff7024
Merge branch 'master' into docs-infra/migrate-demos
dav-is May 28, 2026
7043616
Fix fallback collapse
dav-is May 28, 2026
890720a
iframe
dav-is Jun 1, 2026
57a835c
Bump docs-infra
dav-is Jun 2, 2026
95e9931
Improve expand/collapse animation
dav-is Jun 3, 2026
3770f9e
Merge branch 'master' into docs-infra/migrate-demos
dav-is Jun 3, 2026
5c78090
Merge branch 'master' into docs-infra/migrate-demos
dav-is Jun 4, 2026
9a6481f
bump docs-infra
dav-is Jun 5, 2026
63b0ce3
Fix collapsing behavior
dav-is Jun 5, 2026
0ea2dc8
Migrate links, other fixes
dav-is Jun 5, 2026
12ed0a6
Fix padding
dav-is Jun 5, 2026
861e8c9
Fix fallback
dav-is Jun 5, 2026
5499a01
Bug fixes
dav-is Jun 5, 2026
bc55750
Bugfixes
dav-is Jun 5, 2026
7bbc287
Merge branch 'master' into docs-infra/migrate-demos
dav-is Jun 5, 2026
4af23f4
Improve collapse/expand animation
dav-is Jun 5, 2026
74695da
bump docs-infra
dav-is Jun 9, 2026
34cd6f4
Merge branch 'master' into docs-infra/migrate-demos
dav-is Jun 9, 2026
19bb7d4
Fix validation
dav-is Jun 9, 2026
3609a3d
Add loader
dav-is Jun 9, 2026
09d5e1c
Fix demo provider
dav-is Jun 9, 2026
87aabec
bump docs-infra
dav-is Jun 10, 2026
b055f25
Fix CSS error
dav-is Jun 10, 2026
1edc047
Fix after mount google maps
dav-is Jun 10, 2026
5db4677
Merge branch 'master' into docs-infra/migrate-demos
dav-is Jun 10, 2026
569b466
prettier
dav-is Jun 10, 2026
ba1ec94
Fix cssVarPrefix
dav-is Jun 10, 2026
0806990
Fix loading border radius
dav-is Jun 11, 2026
d81323b
Fix extraFiles in React Runner
dav-is Jun 11, 2026
29e42c4
Fix toolbar grouping
dav-is Jun 11, 2026
c888aa7
Lazy load live editing
dav-is Jun 11, 2026
5d3ce17
Lazy load react runner
dav-is Jun 11, 2026
4a6f1f4
Lazy load editing on interaction
dav-is Jun 11, 2026
6bdd5a6
Include language provider
dav-is Jun 11, 2026
5bced94
Re-enable netlify cache
dav-is Jun 11, 2026
9dfa918
fix linking, remove button animation
dav-is Jun 11, 2026
1ea8c4b
Merge branch 'master' into docs-infra/migrate-demos
dav-is Jun 11, 2026
756a914
Improve theme provider performance
dav-is Jun 11, 2026
4425c69
CSS performance optimizations
dav-is Jun 11, 2026
aa3b431
Merge branch 'master' into docs-infra/migrate-demos
dav-is Jun 11, 2026
eef7c8e
Fix demo linking
dav-is Jun 11, 2026
04f4b48
bump docs-infra
dav-is Jun 11, 2026
9a3cf41
pnpm dedupe
dav-is Jun 11, 2026
967126c
Improve scrollbar css
dav-is Jun 12, 2026
afc8b77
Improve emphasis styles
dav-is Jun 12, 2026
676fd6e
Fix MUI Chat export
dav-is Jun 12, 2026
27b6b80
Re-disable netlify cache
dav-is Jun 12, 2026
906a27e
Merge branch 'master' into docs-infra/migrate-demos
dav-is Jun 16, 2026
ee7d062
Undo migration
dav-is Jun 16, 2026
34bb605
Revert "Undo migration"
dav-is Jun 16, 2026
9bb36d9
Don't include title and summary heading in TOC
dav-is Jun 16, 2026
bcca4cc
Remove confusing note
dav-is Jun 16, 2026
a48620c
Merge branch 'master' into docs-infra/migrate-demos
dav-is Jun 17, 2026
6f63021
Merge branch 'master' into docs-infra/migrate-demos
dav-is Jun 24, 2026
d7bbec7
Upgrade to docs-infra based runner
dav-is Jun 24, 2026
f5f4fdd
pnpm dedupe
dav-is Jun 24, 2026
027aabf
Make backwards compatible
dav-is Jun 24, 2026
ad88fa6
Update markdown generation
dav-is Jun 25, 2026
404d2ed
Code review
dav-is Jun 25, 2026
88b665d
Merge branch 'master' into docs-infra/migrate-demos
dav-is Jun 25, 2026
fde410c
pnpm dedupe
dav-is Jun 25, 2026
2566bbf
Remove temp migration scripts
dav-is Jun 25, 2026
89d34ee
Merge branch 'docs-infra/migrate-demos' of github.com:dav-is/material…
dav-is Jun 25, 2026
8c9cef8
revert migration
dav-is Jun 25, 2026
3377b67
Revert "revert migration"
dav-is Jun 25, 2026
a115dee
Merge branch 'master' into docs-infra/migrate-demos
dav-is Jun 25, 2026
d50eca8
Merge remote-tracking branch 'upstream/master' into docs-infra/migrat…
brijeshb42 Jul 8, 2026
64ccf77
Move docs-infra version to docs vatalog
brijeshb42 Jul 8, 2026
86cfa8b
Fix code error tooltip position
brijeshb42 Jul 8, 2026
838253e
Merge remote-tracking branch 'upstream/master' into docs-infra/migrat…
brijeshb42 Jul 8, 2026
8a621fe
Remove dev menu items on demos
brijeshb42 Jul 8, 2026
e0a49b3
Strip syntax error position in code collapsed mode
brijeshb42 Jul 8, 2026
58f20c3
Remove error position altogether
brijeshb42 Jul 8, 2026
984b63c
Latest docs-infra
brijeshb42 Jul 8, 2026
f0dee56
Exclude mui-internal packages from trustpolicy
brijeshb42 Jul 8, 2026
23329c0
Fix missing integrity
brijeshb42 Jul 8, 2026
39f0fa9
Lint fix
brijeshb42 Jul 8, 2026
82459e6
Disable bundle size checker on core-docs
brijeshb42 Jul 8, 2026
6c27a17
Bump docs-infra
brijeshb42 Jul 8, 2026
4ef3232
Bump version
brijeshb42 Jul 9, 2026
b223f69
Merge branch 'master' into docs-infra/migrate-demos
brijeshb42 Jul 9, 2026
4444a4e
Trust policy exclude
brijeshb42 Jul 9, 2026
ab90346
Fix types
brijeshb42 Jul 9, 2026
b84c5f3
Merge branch 'master' into docs-infra/migrate-demos
brijeshb42 Jul 9, 2026
69a4a0e
Merge branch 'master' into docs-infra/migrate-demos
brijeshb42 Jul 10, 2026
a1a6f5d
Bump docs-infra
brijeshb42 Jul 10, 2026
8b36240
Merge branch 'master' into docs-infra/migrate-demos
brijeshb42 Jul 10, 2026
adda16b
Remove trustPolicyExclude
brijeshb42 Jul 10, 2026
e1f7337
Merge branch 'master' into docs-infra/migrate-demos
brijeshb42 Jul 14, 2026
4b3587d
Merge branch 'master' into docs-infra/migrate-demos
brijeshb42 Jul 15, 2026
acd4d40
Merge branch 'master' into docs-infra/migrate-demos
brijeshb42 Jul 15, 2026
9c65ef2
Fix animation on new line
brijeshb42 Jul 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 0 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,6 @@ jobs:
steps:
- checkout
- install-deps
- run:
name: Transpile TypeScript demos
command: pnpm docs:typescript:formatted
- run:
name: '`pnpm docs:typescript:formatted` changes committed?'
command: git add -A && git diff --exit-code --staged
- run:
name: Tests TypeScript definitions
command: pnpm typescript:ci
Expand Down
36 changes: 31 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,39 @@ pnpm proptypes && pnpm docs:api

### Docs demos

Always author the TypeScript version of the demos. To generate the JavaScript variant, run:
Demos live next to their page under `docs/data/<product>/components/<component>/demos/<demo-name>/`. Each demo folder contains three files:

```bash
pnpm docs:typescript:formatted
- `<ComponentName>.tsx` — the demo source, authored as TypeScript (`.tsx`).
- `client.ts` — marks the demo's client boundary:

```ts
'use client';

import { createDemoClient } from '@mui/internal-core-docs/utils/createDemoClient';

export default createDemoClient(import.meta.url);
```

- `index.ts` — wires the demo into the docs pipeline:

```ts
import { createDemo } from '@mui/internal-core-docs/utils/createDemo';
import ClientProvider from './client';
import BasicButtons from './BasicButtons';

export default createDemo(import.meta.url, BasicButtons, { ClientProvider });
```

Reference the demo from the page's markdown via the `component` field. Use a `file://` URL with a path relative to the markdown file:

```md
{{"component": "file://./demos/basic/index.ts"}}
Comment thread
brijeshb42 marked this conversation as resolved.
```

Demo options (`bg`, `hideToolbar`, `isolated`, `iframe`, `defaultCodeOpen`, `maxWidth`, `height`, `disableAd`, `disableLiveEdit`, `hideEditButton`, `aiSuggestion`, `anchorId`) are defined by the `DemoOptions` interface in `packages-internal/core-docs/src/DemoContent/DemoContent.tsx`. Use `{/* @focus-start */}` / `{/* @focus-end */}` JSX comments inside the demo to highlight regions in the rendered code viewer.

The demo infrastructure itself is documented at <https://mui-internal.netlify.app/docs-infra/>.

## Architecture

This is a monorepo managed by Lerna with Nx for caching. Key packages:
Expand Down Expand Up @@ -228,8 +255,7 @@ Read the relevant `AGENTS.md` when helping users with those topics.
3. `pnpm typescript` - Pass type checking
4. `pnpm test:unit` - Pass unit tests
5. If API changed: `pnpm proptypes && pnpm docs:api`
6. If demos changed: `pnpm docs:typescript:formatted`
7. If `.md` files changed: `pnpm vale <file1> <file2> ...` - Check prose style and grammar
6. If `.md` files changed: `pnpm vale <file1> <file2> ...` - Check prose style and grammar

## PR Title Format

Expand Down
76 changes: 57 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,28 @@ Here are a few guidelines that will help you along the way.
- [Trying changes on the playground](#trying-changes-on-the-playground)
- [How to increase the chances of being accepted](#how-to-increase-the-chances-of-being-accepted)
- [CI checks and how to fix them](#ci-checks-and-how-to-fix-them)
- [Continuous Releases](#continuous-releases)
- [ci/circleci: checkout](#cicircleci-checkout)
- [ci/circleci: test_static](#cicircleci-test_static)
- [ci/circleci: test_unit-1](#cicircleci-test_unit-1)
- [ci/circleci: test_browser](#cicircleci-test_browser)
- [ci/circleci: test_regressions](#cicircleci-test_regressions)
- [ci/circleci: test_types](#cicircleci-test_types)
- [ci/circleci: test_bundle_size_monitor](#cicircleci-test_bundle_size_monitor)
- [argos](#argos)
- [deploy/netlify](#deploynetlify)
- [codecov/project](#codecovproject)
- [Misc](#misc)
- [Updating the component API documentation](#updating-the-component-api-documentation)
- [Coding style](#coding-style)
- [Contributing to the documentation](#contributing-to-the-documentation)
- [How to find docs issues to work on](#how-to-find-docs-issues-to-work-on)
- [How to add a new demo to the docs](#how-to-add-a-new-demo-to-the-docs)
- [1. Create the demo folder](#1-create-the-demo-folder)
- [2. Write the demo code](#2-write-the-demo-code)
- [3. Add `client.ts` and `index.ts`](#3-add-clientts-and-indexts)
- [4. Reference the demo from Markdown](#4-reference-the-demo-from-markdown)
- [5. Submit your PR](#5-submit-your-pr)
- [How can I use a change that hasn't been released yet?](#how-can-i-use-a-change-that-hasnt-been-released-yet)
- [Roadmap](#roadmap)
- [License](#license)
Expand Down Expand Up @@ -162,7 +179,6 @@ The following statements must be true:
- The code is linted. If the code was changed, run `pnpm eslint`.
- The code is type-safe. If TypeScript sources or declarations were changed, run `pnpm typescript` to confirm that the check passes.
- The API docs are up to date. If API was changed, run `pnpm proptypes && pnpm docs:api`.
- The demos are up to date. If demos were changed, run `pnpm docs:typescript:formatted`. See [about writing demos](#2-write-the-demo-code).
- The pull request title follows the pattern `[product-name][Component] Imperative commit message`. (See: [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/) for a great explanation).

Don't worry if you miss a step—the Continuous Integration will run a thorough set of tests on your commits, and the maintainers of the project can assist you if you run into problems.
Expand Down Expand Up @@ -286,47 +302,69 @@ Or [follow this link directly to the results of that search](https://github.com/

### How to add a new demo to the docs

The following steps explain how to add a new demo to the docs using the Button component as an example:
Demos are powered by [`@mui/internal-docs-infra`](https://mui-internal.netlify.app/docs-infra/). The following steps explain how to add a new demo using the Button component as an example.

#### 1. Add a new component file to the directory
#### 1. Create the demo folder

Add the new file to the component's corresponding directory:
Each demo lives in its own kebab-cased folder next to the component's markdown page:

```bash
docs/src/pages/components/buttons/
docs/data/material/components/buttons/demos/super/
```

and give it a name: how about `SuperButtons.tsx`?

#### 2. Write the demo code

We use TypeScript to document our components.
We prefer demos written in TypeScript (using the `.tsx` file format).
Demos are authored as TypeScript (`.tsx`).

```tsx
// docs/data/material/components/buttons/demos/super/SuperButtons.tsx
import * as React from 'react';
import Button from '@mui/material/Button';

export default function SuperButtons() {
return <Button>Super</Button>;
}
```

Use `{/* @focus-start */}` / `{/* @focus-end */}` JSX comments inside the demo to highlight regions in the rendered code viewer.

#### 3. Add `client.ts` and `index.ts`

After creating a TypeScript demo, run `pnpm docs:typescript:formatted` to automatically create the JavaScript version, which is also required.
```ts
// docs/data/material/components/buttons/demos/super/client.ts
'use client';

If you're not familiar with TypeScript, you can write the demo in JavaScript, and a core contributor may help you migrate it to TypeScript.
import { createDemoClient } from '@mui/internal-core-docs/utils/createDemoClient';

#### 3. Edit the page's Markdown file
export default createDemoClient(import.meta.url);
```

```ts
// docs/data/material/components/buttons/demos/super/index.ts
import { createDemo } from '@mui/internal-core-docs/utils/createDemo';
import ClientProvider from './client';
import SuperButtons from './SuperButtons';

export default createDemo(import.meta.url, SuperButtons, { ClientProvider });
```

The Markdown file in the component's respective folder—in this case, `/buttons/buttons.md`—is the source of content for the document.
Any changes you make there will be reflected on the website.
#### 4. Reference the demo from Markdown

Add a header and a brief description of the demo and its use case, along with the `"demo"` code snippet to inject it into the page:
The Markdown file in the component's respective folder—in this case, `buttons.md`—is the source of content for the document. The `component` field is a `file://` URL relative to the Markdown file:

```diff
+### Super buttons
+
+To create a super button for a specific use case, add the `super` prop:
+
+{{"demo": "pages/components/buttons/SuperButtons.js"}}
+{{"component": "file://./demos/super/index.ts"}}
```

#### 4. Submit your PR
Demo options (`bg`, `hideToolbar`, `isolated`, `iframe`, `defaultCodeOpen`, `maxWidth`, `height`, `disableAd`, `disableLiveEdit`, `hideEditButton`, `aiSuggestion`, `anchorId`) are defined by the `DemoOptions` interface in [`packages-internal/core-docs/src/DemoContent/DemoContent.tsx`](packages-internal/core-docs/src/DemoContent/DemoContent.tsx). See the [demo variants experiment page](docs/pages/experiments/docs/demos.md) for live examples.

Now you're ready to [open a PR](#sending-a-pull-request) to add your new demo to the docs.
#### 5. Submit your PR

Check out [this Toggle Button demo PR](https://github.com/mui/material-ui/pull/19582/files) for an example of what your new and edited files should look like when opening your own demo PR.
Now you're ready to [open a PR](#sending-a-pull-request) to add your new demo to the docs.

## How can I use a change that hasn't been released yet?

Expand Down
44 changes: 0 additions & 44 deletions docs/data/material/components/accordion/AccordionExpandDefault.js

This file was deleted.

45 changes: 0 additions & 45 deletions docs/data/material/components/accordion/AccordionExpandIcon.js

This file was deleted.

77 changes: 0 additions & 77 deletions docs/data/material/components/accordion/AccordionTransition.js

This file was deleted.

Loading
Loading