mui / mui/material-ui

Support for disabling some shadows

Open
#44,291 1 comment 1 reaction 1 assignee View on GitHub

@siriwatknp is already working on this.

Since Nov 4, 2024.

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

Description

Summary

Currently, MUI does not allow overriding the Shadows without augmenting the interface.
24 values are quite a lot to choose from. In our use case, we are okay with 3 values.

Since the current Shadows does not allow overrides unless you override the whole list of 24 values.
It would be beneficial to have a way of turning off the values that are not used.

Examples

For example, in the Typography component, we override the variants and disable them via the TypographyPropsVariantOverrides interface.

See the docs Adding & disabling variants. This functionality could be extended to the Shadows.

Motivation

The use case varies across different applications. However, the chances that a design system will have 24 shadow values are almost zero. In our design system, we agreed to have 2 to 3 shadow values.

Hence, being able to disable the ones that are not used is beneficial.

My suggestion is a bit related to this: https://github.com/mui/material-ui/issues/28820, but not the same thing.

Search keywords: shadow overrides

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.