MUI best practices


目录

This article assumes you're following our recommended practice by using our Material UI theme. Following the steps below maximizes compatibility with Docker Desktop and minimizes the work you need to do as an extension author. They should be considered supplementary to the non-MUI-specific guidelines found in the UI Styling overview.

Assume the theme can change at any time

Resist the temptation to fine-tune your UI with precise colors, offsets and font sizings to make it look as attractive as possible. Any specializations you make today will be relative to the current MUI theme, and may look worse when the theme changes. Any part of the theme might change without warning, including (but not limited to):

The best way to build your UI, so that it’s robust against future theming changes, is to:

When you go custom, centralize it

Sometimes you’ll need a piece of UI that doesn’t exist in our design system. If so, we recommend that you first reach out to us. We may already have something in our internal design system, or we may be able to expand our design system to accommodate your use case.

If you still decide to build it yourself after contacting us, try and define the new UI in a reusable fashion. If you define your custom UI in just one place, it’ll make it easier to change in the future if our core theme changes. You could use:

Some of the above options require you to extend our MUI theme. See the MUI documentation on theme composition.

What's next?


版本号 #2
由 壳壳虫 创建于 2026-10-31 19:32:59 UTC
由 壳壳虫 更新于 2026-10-31 19:33:01 UTC