mui / mui/material-ui

[docs] Add "Kitchen Sink" theme component customization example

Open
#30,406 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Duplicates
  • I have searched the existing issues
Latest version
  • I have tested the latest version
Summary 💡

Traversing the docs is a bit cumbersome when you're custom styling a prebuilt component (i.e. Select):

It would be super instructive/helpful to see a giant JSON object showing all the potential values and all the deeply nested keys. Either with the default values explicitly defined in the theme.components or just some wacky custom thing where you literally alter every possible property for each component, and all its constituent parts.

So, like below, but, instead, with a customs value for all the possible keys/properties. It would be a lot like the default theme docs, where it shows the obejct, but, probably a bit larger due to all the different components. Or maybe it could be added to each component page, such that one could copy/paste it right into the components object, then tinker.

It would be super useful/instructive. I would use it by finding the component I was interested in styling, copy/pasting just that config into my theme, then, removing stuff until I had just what I needed to update.

Thanks!

export const theme = createTheme({
  
  components: {
    MuiCssBaseline: {
      styleOverrides: {
        '@global': {
          html: {
            fontFamily,
          },
          ul: {
            margin: 0,
            padding: 0,
            listStyleType: 'none',
          },
        },
      },
    },

    MuiSlider: {
      styleOverrides: {
        root: {
          "& .MuiSlider-thumb.monkey": {
            color: "green",
            borderRadius: "1px",
          },
        },
        thumb: {
          color: "yellow",
          borderRadius: "1px",
        },
      },
    },
  },
})
Examples 🌈

No response

Motivation 🔦

Making the docs more "tinkerer" friendly vs. having to rely on written documentation.

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

Start by reviewing the existing theme and component customization documentation, especially the theme.components examples. Define a copy-pastable “Kitchen Sink” example that covers the available nested customization keys and component parts, then verify that the example is accurate and useful across the relevant component pages.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.