mui / mui/material-ui

Export theme augmentation from package

Open
#31,097 11 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs scope: all components typescript
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Hello!
We are building a custom MUI theme to be used in our applications and we are taking advantage of the module augmentation feature of Typescript to add some color definitions and some typography variants.
Now that we are happy with the result we want to isolate the theme object in an external package to be installed in our applications. The issue is that when I work in the application project I cannot find my custom colours and variants...

Unfortunately I haven't found any useful documentation about this, so I have two questions:

  • Is what we are trying to do feasible?
  • Is there any recommendation to achieve this?

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are mentioned. Start by reviewing the existing TypeScript module-augmentation and theme documentation, then document whether augmentations can be exported from an external package and the recommended setup; done means the two questions have a clear, usable answer.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
developer-experience, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.