+
+ );
+}
diff --git a/docs/data/joy/customization/theme-tokens/RemoveActiveTokens.js b/docs/data/joy/customization/theme-colors/RemoveActiveTokens.js
similarity index 100%
rename from docs/data/joy/customization/theme-tokens/RemoveActiveTokens.js
rename to docs/data/joy/customization/theme-colors/RemoveActiveTokens.js
diff --git a/docs/data/joy/customization/theme-colors/theme-colors.md b/docs/data/joy/customization/theme-colors/theme-colors.md
new file mode 100644
index 00000000000000..0413fb059dd664
--- /dev/null
+++ b/docs/data/joy/customization/theme-colors/theme-colors.md
@@ -0,0 +1,284 @@
+# Theme colors
+
+
Learn about the theme's default colors and how to customize them.
+
+## Default tokens
+
+The table below lists all the default tokens and their values in light and dark color schemes.
+Some tokens reuse values from other tokens using the [`var(--*)`](https://developer.mozilla.org/en-US/docs/Web/CSS/var) syntax.
+
+{{"demo": "PaletteThemeViewer.js", "bg": "inline"}}
+
+### Channel tokens
+
+The default tokens ending with `Channel` are automatically generated for each palette.
+These tokens are useful for creating translucent colors (`rgba`).
+
+- `lightChannel`: is generated from the palette's `200` token.
+- `mainChannel`: is generated from the palette's `500` token.
+- `darkChannel`: is generated from the palette's `800` token.
+
+The example usage is:
+
+```js
+import Typography from '@mui/joy/Typography';
+
+ ({
+ color: `rgba(${theme.vars.palette.primary.mainChannel} / 0.72)`,
+ })}
+>
+```
+
+### Global variant tokens
+
+By default, Joy UI has four built-in [global variants](/joy-ui/main-features/global-variants/) tokens: `plain`, `outlined`, `soft`, and `solid`.
+
+The global variant token is composed of three parts, in the format of **variant type | state | CSS property**.
+
+For example:
+
+- `solidBg` refers to the solid variant's background color in its initial state.
+- `outlinedHoverBorder` refers to the outlined variant's border color in its hover state.
+
+There are six palettes (`primary`, `neutral`, `danger`, `info`, `success`, and `warning`) that contain the global variant tokens as listed in the [table above](#default-tokens).
+
+## Customizing the default palette
+
+For each color scheme, the default colors are grouped within the `palette` node.
+
+For example, the snippet below customizes the primary palette in dark mode:
+
+```js
+import { extendTheme } from '@mui/joy/styles';
+
+const theme = extendTheme({
+ colorSchemes: {
+ dark: {
+ palette: {
+ primary: {
+ 50: '#C0CCD9',
+ 100: '#A5B8CF',
+ 200: '#6A96CA',
+ 300: '#4886D0',
+ 400: '#2178DD',
+ 500: '#096BDE',
+ 600: '#1B62B5',
+ 700: '#265995',
+ 800: '#2F4968',
+ 900: '#2F3C4C',
+ },
+ },
+ },
+ },
+});
+
+// Then, pass it to ``.
+```
+
+## Customizing global variant tokens
+
+We recommend using the [Button](/joy-ui/react-button/) component as a jumping-off point when customizing the global variants, because it gives you access to more of the interactive variants available than some other components.
+
+As an example, let's customize Joy UI's Button so to match the style of [Bootstrap](https://getbootstrap.com/docs/5.2/components/buttons/#examples):
+
+- Bootstrap's default buttons are comparable to Joy UI's `solid` variant.
+- Bootstrap's `secondary` variant uses a grey color, similar to Joy UI's `neutral`.
+- Bootstrap's `btn-light` is similar to Joy UI's button using the `soft` variant and `neutral` color palette.
+- Joy UI's defaults don't include anything similar to Bootstrap's `btn-dark`.
+ - We can recreate it using one of the three main customization approaches.
+
+{{"demo": "BootstrapVariantTokens.js"}}
+
+:::info
+Customizing the global variant tokens affects all Joy UI components that support the `variant` prop.
+:::
+
+## Removing the default tokens
+
+To remove any default token, use `undefined` as a value.
+This removes it from the `theme` object and prevents the corresponding CSS variable from being generated.
+
+For example, all default global variant tokens comes with styles for the `:active` pseudo class.
+Here's how you'd remove it from the solid variant.
+
+```jsx
+// ⚠️ If the value is `undefined`, it should be `undefined` for all color schemes.
+const theme = extendTheme({
+ colorSchemes: {
+ light: {
+ palette: {
+ primary: {
+ solidActiveBg: undefined,
+ },
+ },
+ },
+ dark: {
+ palette: {
+ primary: {
+ solidActiveBg: undefined,
+ },
+ },
+ },
+ },
+});
+```
+
+{{"demo": "RemoveActiveTokens.js"}}
+
+## Adding more colors
+
+Any custom tokens that you add to theme are available for use with both the `styled` and `sx` APIs.
+
+```js
+extendTheme({
+ colorSchemes: {
+ light: {
+ palette: {
+ // Example of new color tokens.
+ // We recommend to limit them to 3 levels deep-in this case:
+ // `palette.gradient.primary`.
+ gradient: {
+ primary: 'linear-gradient(to top, var(--joy-palette-primary-main), #000)',
+ },
+ },
+ },
+ },
+});
+
+// `sx` prop usage example:
+
+
+
Learn about the theme's default shadow and how to customize it.
+
+## Default tokens
+
+Joy UI uses a T-shirt scale (sm, md, lg, etc.) for defining shadows used by components such as [Card](/joy-ui/react-card/), [Menu](/joy-ui/react-menu/), and more.
+
+These tokens are grouped inside the `theme.shadow` node:
+
+{{"demo": "ShadowThemeViewer.js", "bg": "inline"}}
+
+## Customizing the default shadow
+
+Provide key-values to the `shadow` node to override the default shadows:
+
+```js
+import { extendTheme } from '@mui/joy/styles';
+
+const theme = extendTheme({
+ shadow: {
+ xs: '{CSS box-shadow}',
+ sm: '{CSS box-shadow}',
+ md: '{CSS box-shadow}',
+ lg: '{CSS box-shadow}',
+ xl: '{CSS box-shadow}',
+ },
+});
+
+// Then, pass it to ``.
+```
+
+:::success
+We recommend using `var(--joy-shadowRing)` and `var(--joy-shadowChannel)` for shadow values, similar to the [default token value](#default-tokens).
+:::
+
+## Adding new shadows
+
+You can add any custom keys to the `shadow` node:
+
+```js
+import { extendTheme } from '@mui/joy/styles';
+
+const theme = extendTheme({
+ shadow: {
+ subtle: '{CSS box-shadow}',
+ strong: '{CSS box-shadow}',
+ },
+});
+
+// Then, pass it to ``.
+```
+
+### TypeScript
+
+When working in TypeScript, you need to augment the theme's `Shadow` interface with the new keys:
+
+```ts
+// You can put this to any file that's included in your tsconfig
+declare module '@mui/joy/styles' {
+ interface Shadow {
+ subtle: string;
+ strong: string;
+ }
+}
+```
+
+## Shadow ring
+
+The shadow ring can be configured for both light and dark color schemes.
+To create a shadow ring, provide a valid CSS box-shadow value to the `shadowRing` node:
+
+```js
+import { extendTheme } from '@mui/joy/styles';
+
+const theme = extendTheme({
+ colorSchemes: {
+ light: {
+ // This creates a 1px box-shadow.
+ shadowRing: '0 0 0 1px rgba(0 0 0 / 0.1)',
+ },
+ dark: {
+ shadowChannel: '0 0 0 1px rgba(255 255 255 / 0.1)',
+ },
+ },
+});
+
+// Then, pass it to ``.
+```
+
+:::warning
+Customizing the theme's shadow ring will affect all Joy UI components that consume the theme's shadows.
+
+If you want to create a shadow ring for a specific element, see [Customizing shadows on an element](#customizing-shadows-on-an-element).
+:::
+
+## Shadow colors
+
+The color of the shadow comes from the theme token named `var(--joy-shadowChannel)`.
+You can customize the value for both light and dark color schemes:
+
+```js
+import { extendTheme } from '@mui/joy/styles';
+
+const theme = extendTheme({
+ colorSchemes: {
+ light: {
+ shadowChannel: '12 12 12',
+ },
+ dark: {
+ shadowChannel: '0 0 0',
+ },
+ },
+});
+
+// Then, pass it to ``.
+```
+
+:::warning
+The `shadowChannel` value must be rgb channels, e.g. `187 187 187`.
+:::
+
+## Customizing shadows on an element
+
+To customize a shadow color or shadow ring on a specific instance, use the raw value from the `theme.shadow.*`.
+
+:::warning
+**Don't** use shadows from `theme.vars` or the shorthand syntax `{ shadow: '{key}' }` because the value points to the global CSS variable which does not work with the custom `shadowChannel` and `shadowRing` on the instance.
+:::
+
+```js
+// ✅
+ ({
+ boxShadow: theme.shadow.md,
+ '--joy-shadowChannel': theme.vars.palette.primary.mainChannel,
+ '--joy-shadowRing': 'inset 0 -3px 0 rgba(0 0 0 / 0.24)',
+ })}
+>
+
+// ❌ Both of these do not work
+ ({
+ boxShadow: 'md',
+ '--joy-shadowChannel': theme.vars.palette.primary.mainChannel,
+ '--joy-shadowRing': 'inset 0 -3px 0 rgba(0 0 0 / 0.24)',
+ })}
+>
+ ({
+ boxShadow: theme.vars.shadow.md,
+ '--joy-shadowChannel': theme.vars.palette.primary.mainChannel,
+ '--joy-shadowRing': 'inset 0 -3px 0 rgba(0 0 0 / 0.24)',
+ })}
+>
+```
+
+{{"demo": "CustomShadowOnElement.js"}}
diff --git a/docs/data/joy/customization/theme-tokens/CustomVariantStyle.js b/docs/data/joy/customization/theme-tokens/CustomVariantStyle.js
deleted file mode 100644
index 87ca552a2c726e..00000000000000
--- a/docs/data/joy/customization/theme-tokens/CustomVariantStyle.js
+++ /dev/null
@@ -1,64 +0,0 @@
-import * as React from 'react';
-import { CssVarsProvider, extendTheme } from '@mui/joy/styles';
-import Box from '@mui/joy/Box';
-import Button from '@mui/joy/Button';
-import Typography from '@mui/joy/Typography';
-
-const theme = extendTheme({
- variants: {
- solid: {
- primary: {
- boxShadow: '0 2px 6px 0 rgba(0,0,0,0.3)',
- },
- },
- solidHover: {
- primary: {
- '&:hover': {
- boxShadow: '0 2px 8px 0 rgba(0,0,0,0.4)',
- },
- },
- },
- },
-});
-
-const useEnhancedEffect =
- typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
-
-export default function BootstrapVariantTokens() {
- // the `node` is used for attaching CSS variables to this demo, you might not need it in your application.
- const [node, setNode] = React.useState(null);
- useEnhancedEffect(() => {
- setNode(document.getElementById('custom-variant-style-demo'));
- }, []);
-
- return (
-
- div': { textAlign: 'center' },
- }}
- >
-
- Button
-
- The shadow applied
-
-
-
- Button
-
- No custom shadow
-
-
-
-
- );
-}
diff --git a/docs/data/joy/customization/theme-tokens/theme-tokens-pt.md b/docs/data/joy/customization/theme-tokens/theme-tokens-pt.md
deleted file mode 100644
index a9352acfdae468..00000000000000
--- a/docs/data/joy/customization/theme-tokens/theme-tokens-pt.md
+++ /dev/null
@@ -1,355 +0,0 @@
-# Theme tokens
-
-
Learn about the two categories of tokens within Joy UI's default theme and how to customize them.
-
-The [W3C Community Group](https://github.com/design-tokens/community-group) defines design tokens as: _"...indivisible pieces of a design system such as colors, spacing, typography scale."_ Joy UI builds up on this concept to develop its theme, consisting of two categories: low-level and global variant tokens.
-
-## Low-level tokens
-
-Low-level tokens refer to the smallest units of style that defines the look and feel Joy UI has out-of-the-box. They're labeled as _low-level_ because they can be used to compose larger tokens, such as the typography scale.
-
-### Structure
-
-Joy UI's default theme has three main categories of low-level design tokens:
-
-1. Color
-2. Typography
-3. Shape-related
-
-#### Color
-
-The first theme node within the color category is `colorSchemes`. It houses the `light` and `dark` nodes, and inside each one of them, there is a `palette` node, containing the [global variant tokens](#global-variant-tokens) adjusted for both modes.
-
-```js
-colorSchemes: {
- light: {
- palette: {
- primary: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- },
- neutral: {...},
- ...
- },
- },
- dark: {
- palette: {
- primary: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- },
- neutral: {...},
- ...
- },
- },
-}
-```
-
-Visit the [ColorSystem interface](https://github.com/mui/material-ui/blob/master/packages/mui-joy/src/styles/types/colorSystem.ts#L142) to see all of the available interfaces.
-
-#### Channel tokens
-
-The tokens ended with `Channel` are automatically generated from the provided theme unless you explicitly specify them. These tokens are useful for creating translucent (alpha) colors.
-
-```js
-import Typography from '@mui/joy/Typography';
-
- ({
- color: `rgba(${theme.vars.palette.primary.mainChannel} / 0.72)`,
- })}
->
-```
-
-#### Typography
-
-Within the typography-related tokens, there are first the ones that map out to common CSS typography properties:
-
-```js
-fontSize: {...},
-fontFamily: {...},
-fontWeight: {...},
-lineHeight: {...},
-letterSpacing: {...},
-```
-
-They're then used to build up Joy UI's typographic scale:
-
-```js
-typography: {
- h1: {
- fontFamily: 'var(--joy-fontFamily-display)',
- fontWeight: 'var(--joy-fontWeight-lg)' as CSSProperties['fontWeight'],
- fontSize: 'var(--joy-fontSize-xl4)',
- lineHeight: 'var(--joy-lineHeight-sm)',
- letterSpacing: 'var(--joy-letterSpacing-sm)',
- color: 'var(--joy-palette-text-primary)',
- },
- h2: {...},
- h3: {...},
- ...
-}
-```
-
-#### Shape
-
-The two main theme nodes related to shape elements are:
-
-```js
-radius: {...},
-shadow: {...},
-```
-
-### Overriding low-level tokens
-
-To customize the theme's low-level design tokens, use the `extendTheme` API to create a new theme and then pass it to the `CssVarsProvider`. The specified tokens will be deeply merged into the default values.
-
-```js
-import { CssVarsProvider, extendTheme } from '@mui/joy/styles';
-
-const theme = extendTheme({
- colorSchemes: {
- light: {
- palette: {
- background: {
- // palette.neutral.50 is the default token
- body: 'var(--joy-palette-neutral-50)',
- },
- },
- },
- },
-});
-
-function App() {
- return ...;
-}
-```
-
-:::info
-**Note**: Joy UI will add the prefix (default as `joy`) to all CSS variables. To change it, use ``. and the generated CSS variables will then be:
-
-```diff
-- --joy-palette-primary-50: /* color */ ;
-+ --myproduct-palette-primary-50: /* color */ ;
-```
-
-:::
-
-### Adding low-level tokens
-
-You can add any custom tokens to the theme and still be able to use them in APIs like `styled` and `sx` prop.
-
-```ts
-extendTheme({
- colorSchemes: {
- light: {
- palette: {
- // Example of new color tokens.
- // We recommend to limit them to 3 levels deep-in this case `palette.brand.primary`.
- brand: {
- primary: 'green',
- secondary: 'red',
- },
- },
- },
- },
-});
-```
-
-For **TypeScript**, you need to augment the theme structure to include the new tokens.
-
-```ts
-import { CssVarsProvider, extendTheme } from '@mui/joy/styles';
-
-declare module '@mui/joy/styles' {
- interface Palette {
- brand: {
- primary: string;
- secondary: string;
- };
- }
-}
-```
-
-After that, you can use those tokens in the `styled` function or the `sx` prop:
-
-```jsx
-// sx prop
-;
-
-// styled function
-const Text = styled('p')(({ theme }) => ({
- color: theme.vars.palette.brand.primary,
-}));
-```
-
-:::warning
-**Note:** Adding new tokens is worth it when you know that a large number of components will use them. That's because doing so increases stylesheet bundle size, plus the added maintenance costs.
-
-If you're not sure about it yet, we recommend using [the `sx` prop](/joy-ui/customization/approaches/#sx-prop) for one-off customizations.
-:::
-
-## Global variant tokens
-
-By default, Joy UI has four built-in [global variants](/joy-ui/main-features/global-variants/) tokens: `plain`, `outlined`, `soft`, and `solid`.
-
-### Structure
-
-The colors for each variant are defined inside the `palette` node. The variant name is composed of three parts, in the format of **variant type | state | CSS property**.
-
-For example:
-
-- `solidBg` refers to the solid variant's initial state (as there is none specified) background color.
-- `outlinedHoverBorder` refers to the outlined variant's hovered border color.
-
-```js
-// theme
-{
- colorSchemes: {
- light: {
- palette: {
- primary: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- neutral: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- danger: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- info: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- success: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- warning: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- }
- },
- dark: {
- // ...same structure with different values
- }
- }
-}
-```
-
-### Overriding global variant tokens
-
-To customize the global variants, we recommend to start from the Button component as it tends to have the larger amount of interactive variants when compared to other components.
-
-As an example, let's customize Joy UI's [`Button`](/joy-ui/react-button/) so they look like the ones from [Bootstrap](https://getbootstrap.com/docs/5.2/components/buttons/#examples):
-
-- Bootstrap's default buttons are comparable to Joy UI's `solid` variant.
-- Bootstrap's `secondary` variant uses a grey color, similar to Joy UI's `neutral`.
-- Bootstrap's `btn-light` is similar to Joy UI's button using the `soft` variant and `neutral` color palette.
-- Joy UI doesn't have anything similar, out-of-the-box, to Bootstrap's `btn-dark`.
- - We could achieve that using one of the tree main customization approaches.
-
-{{"demo": "BootstrapVariantTokens.js"}}
-
-:::warning
-**⚠️ Keep in mind:** Make sure that every color schemes have the same set of global variant tokens, otherwise, their styles will be inconsistent, causing problems for server-side rendering.
-
-```js
-extendTheme({
- colorSchemes: {
- light: {
- palette: {
- primary: {
- solidBorder: '#0d6efd',
- },
- },
- },
- dark: {
- palette: {
- primary: {
- solidBorder: '#111',
- },
- },
- },
- },
-});
-```
-
-:::
-
-### Removing global variants tokens
-
-To remove a global variant token, use `undefined` as a value.
-
-For example, all default global variant tokens comes with styles for the `:active` pseudo class. Here's how you'd remove it from the solid Button variant.
-
-```jsx
-// ⚠️ If the value is `undefined`, it should be `undefined` for other color schemes as well.
-const theme = extendTheme({
- colorSchemes: {
- light: {
- palette: {
- primary: {
- solidActiveBg: undefined,
- },
- },
- },
- dark: {
- palette: {
- primary: {
- solidActiveBg: undefined,
- },
- },
- },
- },
-});
-```
-
-{{"demo": "RemoveActiveTokens.js"}}
-
-### Custom global variant token styles
-
-You can apply custom styles to each global variant via the `variants` node. They can also be applied to a specific palette, which will therefore be merged to the styles generated from the global variant tokens.
-
-```jsx
-const theme = extendTheme({
- variants: {
- solid: {
- primary: {
- boxShadow: '0 2px 6px 0 rgba(0,0,0,0.3)',
- },
- },
- solidHover: {
- primary: {
- '&:hover': {
- boxShadow: '0 2px 8px 0 rgba(0,0,0,0.4)',
- },
- },
- },
- },
-});
-```
-
-{{"demo": "CustomVariantStyle.js"}}
-
-:::warning
-**Keep in mind:** changing styles for the solid variant means that every component solid variant will have them. To customize how a specific component look like, use the [themed components](/joy-ui/customization/themed-components/) approach instead.
-:::
diff --git a/docs/data/joy/customization/theme-tokens/theme-tokens-zh.md b/docs/data/joy/customization/theme-tokens/theme-tokens-zh.md
deleted file mode 100644
index a9352acfdae468..00000000000000
--- a/docs/data/joy/customization/theme-tokens/theme-tokens-zh.md
+++ /dev/null
@@ -1,355 +0,0 @@
-# Theme tokens
-
-
Learn about the two categories of tokens within Joy UI's default theme and how to customize them.
-
-The [W3C Community Group](https://github.com/design-tokens/community-group) defines design tokens as: _"...indivisible pieces of a design system such as colors, spacing, typography scale."_ Joy UI builds up on this concept to develop its theme, consisting of two categories: low-level and global variant tokens.
-
-## Low-level tokens
-
-Low-level tokens refer to the smallest units of style that defines the look and feel Joy UI has out-of-the-box. They're labeled as _low-level_ because they can be used to compose larger tokens, such as the typography scale.
-
-### Structure
-
-Joy UI's default theme has three main categories of low-level design tokens:
-
-1. Color
-2. Typography
-3. Shape-related
-
-#### Color
-
-The first theme node within the color category is `colorSchemes`. It houses the `light` and `dark` nodes, and inside each one of them, there is a `palette` node, containing the [global variant tokens](#global-variant-tokens) adjusted for both modes.
-
-```js
-colorSchemes: {
- light: {
- palette: {
- primary: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- },
- neutral: {...},
- ...
- },
- },
- dark: {
- palette: {
- primary: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- },
- neutral: {...},
- ...
- },
- },
-}
-```
-
-Visit the [ColorSystem interface](https://github.com/mui/material-ui/blob/master/packages/mui-joy/src/styles/types/colorSystem.ts#L142) to see all of the available interfaces.
-
-#### Channel tokens
-
-The tokens ended with `Channel` are automatically generated from the provided theme unless you explicitly specify them. These tokens are useful for creating translucent (alpha) colors.
-
-```js
-import Typography from '@mui/joy/Typography';
-
- ({
- color: `rgba(${theme.vars.palette.primary.mainChannel} / 0.72)`,
- })}
->
-```
-
-#### Typography
-
-Within the typography-related tokens, there are first the ones that map out to common CSS typography properties:
-
-```js
-fontSize: {...},
-fontFamily: {...},
-fontWeight: {...},
-lineHeight: {...},
-letterSpacing: {...},
-```
-
-They're then used to build up Joy UI's typographic scale:
-
-```js
-typography: {
- h1: {
- fontFamily: 'var(--joy-fontFamily-display)',
- fontWeight: 'var(--joy-fontWeight-lg)' as CSSProperties['fontWeight'],
- fontSize: 'var(--joy-fontSize-xl4)',
- lineHeight: 'var(--joy-lineHeight-sm)',
- letterSpacing: 'var(--joy-letterSpacing-sm)',
- color: 'var(--joy-palette-text-primary)',
- },
- h2: {...},
- h3: {...},
- ...
-}
-```
-
-#### Shape
-
-The two main theme nodes related to shape elements are:
-
-```js
-radius: {...},
-shadow: {...},
-```
-
-### Overriding low-level tokens
-
-To customize the theme's low-level design tokens, use the `extendTheme` API to create a new theme and then pass it to the `CssVarsProvider`. The specified tokens will be deeply merged into the default values.
-
-```js
-import { CssVarsProvider, extendTheme } from '@mui/joy/styles';
-
-const theme = extendTheme({
- colorSchemes: {
- light: {
- palette: {
- background: {
- // palette.neutral.50 is the default token
- body: 'var(--joy-palette-neutral-50)',
- },
- },
- },
- },
-});
-
-function App() {
- return ...;
-}
-```
-
-:::info
-**Note**: Joy UI will add the prefix (default as `joy`) to all CSS variables. To change it, use ``. and the generated CSS variables will then be:
-
-```diff
-- --joy-palette-primary-50: /* color */ ;
-+ --myproduct-palette-primary-50: /* color */ ;
-```
-
-:::
-
-### Adding low-level tokens
-
-You can add any custom tokens to the theme and still be able to use them in APIs like `styled` and `sx` prop.
-
-```ts
-extendTheme({
- colorSchemes: {
- light: {
- palette: {
- // Example of new color tokens.
- // We recommend to limit them to 3 levels deep-in this case `palette.brand.primary`.
- brand: {
- primary: 'green',
- secondary: 'red',
- },
- },
- },
- },
-});
-```
-
-For **TypeScript**, you need to augment the theme structure to include the new tokens.
-
-```ts
-import { CssVarsProvider, extendTheme } from '@mui/joy/styles';
-
-declare module '@mui/joy/styles' {
- interface Palette {
- brand: {
- primary: string;
- secondary: string;
- };
- }
-}
-```
-
-After that, you can use those tokens in the `styled` function or the `sx` prop:
-
-```jsx
-// sx prop
-;
-
-// styled function
-const Text = styled('p')(({ theme }) => ({
- color: theme.vars.palette.brand.primary,
-}));
-```
-
-:::warning
-**Note:** Adding new tokens is worth it when you know that a large number of components will use them. That's because doing so increases stylesheet bundle size, plus the added maintenance costs.
-
-If you're not sure about it yet, we recommend using [the `sx` prop](/joy-ui/customization/approaches/#sx-prop) for one-off customizations.
-:::
-
-## Global variant tokens
-
-By default, Joy UI has four built-in [global variants](/joy-ui/main-features/global-variants/) tokens: `plain`, `outlined`, `soft`, and `solid`.
-
-### Structure
-
-The colors for each variant are defined inside the `palette` node. The variant name is composed of three parts, in the format of **variant type | state | CSS property**.
-
-For example:
-
-- `solidBg` refers to the solid variant's initial state (as there is none specified) background color.
-- `outlinedHoverBorder` refers to the outlined variant's hovered border color.
-
-```js
-// theme
-{
- colorSchemes: {
- light: {
- palette: {
- primary: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- neutral: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- danger: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- info: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- success: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- warning: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- }
- },
- dark: {
- // ...same structure with different values
- }
- }
-}
-```
-
-### Overriding global variant tokens
-
-To customize the global variants, we recommend to start from the Button component as it tends to have the larger amount of interactive variants when compared to other components.
-
-As an example, let's customize Joy UI's [`Button`](/joy-ui/react-button/) so they look like the ones from [Bootstrap](https://getbootstrap.com/docs/5.2/components/buttons/#examples):
-
-- Bootstrap's default buttons are comparable to Joy UI's `solid` variant.
-- Bootstrap's `secondary` variant uses a grey color, similar to Joy UI's `neutral`.
-- Bootstrap's `btn-light` is similar to Joy UI's button using the `soft` variant and `neutral` color palette.
-- Joy UI doesn't have anything similar, out-of-the-box, to Bootstrap's `btn-dark`.
- - We could achieve that using one of the tree main customization approaches.
-
-{{"demo": "BootstrapVariantTokens.js"}}
-
-:::warning
-**⚠️ Keep in mind:** Make sure that every color schemes have the same set of global variant tokens, otherwise, their styles will be inconsistent, causing problems for server-side rendering.
-
-```js
-extendTheme({
- colorSchemes: {
- light: {
- palette: {
- primary: {
- solidBorder: '#0d6efd',
- },
- },
- },
- dark: {
- palette: {
- primary: {
- solidBorder: '#111',
- },
- },
- },
- },
-});
-```
-
-:::
-
-### Removing global variants tokens
-
-To remove a global variant token, use `undefined` as a value.
-
-For example, all default global variant tokens comes with styles for the `:active` pseudo class. Here's how you'd remove it from the solid Button variant.
-
-```jsx
-// ⚠️ If the value is `undefined`, it should be `undefined` for other color schemes as well.
-const theme = extendTheme({
- colorSchemes: {
- light: {
- palette: {
- primary: {
- solidActiveBg: undefined,
- },
- },
- },
- dark: {
- palette: {
- primary: {
- solidActiveBg: undefined,
- },
- },
- },
- },
-});
-```
-
-{{"demo": "RemoveActiveTokens.js"}}
-
-### Custom global variant token styles
-
-You can apply custom styles to each global variant via the `variants` node. They can also be applied to a specific palette, which will therefore be merged to the styles generated from the global variant tokens.
-
-```jsx
-const theme = extendTheme({
- variants: {
- solid: {
- primary: {
- boxShadow: '0 2px 6px 0 rgba(0,0,0,0.3)',
- },
- },
- solidHover: {
- primary: {
- '&:hover': {
- boxShadow: '0 2px 8px 0 rgba(0,0,0,0.4)',
- },
- },
- },
- },
-});
-```
-
-{{"demo": "CustomVariantStyle.js"}}
-
-:::warning
-**Keep in mind:** changing styles for the solid variant means that every component solid variant will have them. To customize how a specific component look like, use the [themed components](/joy-ui/customization/themed-components/) approach instead.
-:::
diff --git a/docs/data/joy/customization/theme-tokens/theme-tokens.md b/docs/data/joy/customization/theme-tokens/theme-tokens.md
deleted file mode 100644
index cbb4cf64937045..00000000000000
--- a/docs/data/joy/customization/theme-tokens/theme-tokens.md
+++ /dev/null
@@ -1,367 +0,0 @@
-# Theme tokens
-
-
Learn about the two categories of tokens within Joy UI's default theme and how to customize them.
-
-The [W3C Community Group](https://github.com/design-tokens/community-group) defines design tokens as: _"...indivisible pieces of a design system such as colors, spacing, typography scale."_
-Joy UI builds up on this concept to develop its theme, consisting of two categories:
-
-1. [Low-level tokens](#low-level-tokens)
-2. [Global variant tokens](#global-variant-tokens)
-
-## Low-level tokens
-
-Low-level tokens refer to the smallest units of style that defines the look and feel Joy UI has out-of-the-box.
-They're labeled as _low-level_ because they can be used to compose larger tokens, such as the typography scale.
-
-### Structure
-
-Joy UI's default theme has three main categories of low-level design tokens:
-
-1. Color
-2. Typography
-3. Shape-related
-
-#### Color
-
-The first theme node within the color category is `colorSchemes`.
-It houses the `light` and `dark` nodes, and inside each one of them, there is a `palette` node, containing the [global variant tokens](#global-variant-tokens) adjusted for both modes.
-
-```js
-colorSchemes: {
- light: {
- palette: {
- primary: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- },
- neutral: {...},
- ...
- },
- },
- dark: {
- palette: {
- primary: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- },
- neutral: {...},
- ...
- },
- },
-}
-```
-
-Visit the [ColorSystem interface](https://github.com/mui/material-ui/blob/master/packages/mui-joy/src/styles/types/colorSystem.ts#L142) to see all of the available interfaces.
-
-#### Channel tokens
-
-The tokens ended with `Channel` are automatically generated from the provided theme unless you explicitly specify them.
-These tokens are useful for creating translucent (alpha) colors.
-
-```js
-import Typography from '@mui/joy/Typography';
-
- ({
- color: `rgba(${theme.vars.palette.primary.mainChannel} / 0.72)`,
- })}
->
-```
-
-#### Typography
-
-Within the typography-related tokens, there are first the ones that map out to common CSS typography properties:
-
-```js
-fontSize: {...},
-fontFamily: {...},
-fontWeight: {...},
-lineHeight: {...},
-letterSpacing: {...},
-```
-
-They're then used to build up Joy UI's typographic scale:
-
-```js
-typography: {
- h1: {
- fontFamily: 'var(--joy-fontFamily-display)',
- fontWeight: 'var(--joy-fontWeight-lg)' as CSSProperties['fontWeight'],
- fontSize: 'var(--joy-fontSize-xl4)',
- lineHeight: 'var(--joy-lineHeight-sm)',
- letterSpacing: 'var(--joy-letterSpacing-sm)',
- color: 'var(--joy-palette-text-primary)',
- },
- h2: {...},
- h3: {...},
- ...
-}
-```
-
-#### Shape
-
-The two main theme nodes related to shape elements are:
-
-```js
-radius: {...},
-shadow: {...},
-```
-
-### Overriding low-level tokens
-
-To customize the theme's low-level design tokens, use the `extendTheme` API to create a new theme and then pass it to the `CssVarsProvider`.
-The specified tokens will be deeply merged into the default values.
-
-```js
-import { CssVarsProvider, extendTheme } from '@mui/joy/styles';
-
-const theme = extendTheme({
- colorSchemes: {
- light: {
- palette: {
- background: {
- // palette.neutral.50 is the default token
- body: 'var(--joy-palette-neutral-50)',
- },
- },
- },
- },
-});
-
-function App() {
- return ...;
-}
-```
-
-:::info
-Joy UI will add the prefix (default as `joy`) to all CSS variables.
-To change it, use ``. and the generated CSS variables will then be:
-
-```diff
-- --joy-palette-primary-50: /* color */ ;
-+ --myproduct-palette-primary-50: /* color */ ;
-```
-
-:::
-
-### Adding low-level tokens
-
-You can add any custom tokens to the theme and still be able to use them in APIs like `styled` and `sx` prop.
-
-```ts
-extendTheme({
- colorSchemes: {
- light: {
- palette: {
- // Example of new color tokens.
- // We recommend to limit them to 3 levels deep-in this case `palette.brand.primary`.
- brand: {
- primary: 'green',
- secondary: 'red',
- },
- },
- },
- },
-});
-```
-
-For **TypeScript**, you need to augment the theme structure to include the new tokens.
-
-```ts
-import { CssVarsProvider, extendTheme } from '@mui/joy/styles';
-
-declare module '@mui/joy/styles' {
- interface Palette {
- brand: {
- primary: string;
- secondary: string;
- };
- }
-}
-```
-
-After that, you can use those tokens in the `styled` function or the `sx` prop:
-
-```jsx
-// sx prop
-;
-
-// styled function
-const Text = styled('p')(({ theme }) => ({
- color: theme.vars.palette.brand.primary,
-}));
-```
-
-:::success
-Adding new tokens is worth it when you know that a large number of components will use them. That's because doing so increases stylesheet bundle size, plus the added maintenance costs.
-
-If you're not sure about it yet, we recommend using [the `sx` prop](/joy-ui/customization/approaches/#sx-prop) for one-off customizations.
-:::
-
-## Global variant tokens
-
-By default, Joy UI has four built-in [global variants](/joy-ui/main-features/global-variants/) tokens: `plain`, `outlined`, `soft`, and `solid`.
-
-### Structure
-
-The colors for each variant are defined inside the `palette` node.
-The variant name is composed of three parts, in the format of **variant type | state | CSS property**.
-
-For example:
-
-- `solidBg` refers to the solid variant's initial state (as there is none specified) background color.
-- `outlinedHoverBorder` refers to the outlined variant's hovered border color.
-
-```js
-// theme
-{
- colorSchemes: {
- light: {
- palette: {
- primary: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- neutral: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- danger: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- info: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- success: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- warning: {
- plainColor: 'valid CSS color',
- plainHoverBg: 'valid CSS color',
- plainActiveBg: 'valid CSS color',
- // ...other variant tokens
- },
- }
- },
- dark: {
- // ...same structure with different values
- }
- }
-}
-```
-
-### Overriding global variant tokens
-
-To customize the global variants, we recommend to start from the Button component as it tends to have the larger amount of interactive variants when compared to other components.
-
-As an example, let's customize Joy UI's [`Button`](/joy-ui/react-button/) so they look like the ones from [Bootstrap](https://getbootstrap.com/docs/5.2/components/buttons/#examples):
-
-- Bootstrap's default buttons are comparable to Joy UI's `solid` variant.
-- Bootstrap's `secondary` variant uses a grey color, similar to Joy UI's `neutral`.
-- Bootstrap's `btn-light` is similar to Joy UI's button using the `soft` variant and `neutral` color palette.
-- Joy UI doesn't have anything similar, out-of-the-box, to Bootstrap's `btn-dark`.
- - We could achieve that using one of the tree main customization approaches.
-
-{{"demo": "BootstrapVariantTokens.js"}}
-
-:::warning
-Make sure that every color schemes have the same set of global variant tokens, otherwise, their styles will be inconsistent, causing problems for server-side rendering.
-
-```js
-extendTheme({
- colorSchemes: {
- light: {
- palette: {
- primary: {
- solidBorder: '#0d6efd',
- },
- },
- },
- dark: {
- palette: {
- primary: {
- solidBorder: '#111',
- },
- },
- },
- },
-});
-```
-
-:::
-
-### Removing global variants tokens
-
-To remove a global variant token, use `undefined` as a value.
-
-For example, all default global variant tokens comes with styles for the `:active` pseudo class.
-Here's how you'd remove it from the solid Button variant.
-
-```jsx
-// ⚠️ If the value is `undefined`, it should be `undefined` for other color schemes as well.
-const theme = extendTheme({
- colorSchemes: {
- light: {
- palette: {
- primary: {
- solidActiveBg: undefined,
- },
- },
- },
- dark: {
- palette: {
- primary: {
- solidActiveBg: undefined,
- },
- },
- },
- },
-});
-```
-
-{{"demo": "RemoveActiveTokens.js"}}
-
-### Custom global variant token styles
-
-You can apply custom styles to each global variant via the `variants` node.
-They can also be applied to a specific palette, which will therefore be merged to the styles generated from the global variant tokens.
-
-```jsx
-const theme = extendTheme({
- variants: {
- solid: {
- primary: {
- boxShadow: '0 2px 6px 0 rgba(0,0,0,0.3)',
- },
- },
- solidHover: {
- primary: {
- '&:hover': {
- boxShadow: '0 2px 8px 0 rgba(0,0,0,0.4)',
- },
- },
- },
- },
-});
-```
-
-{{"demo": "CustomVariantStyle.js"}}
-
-:::warning
-Changing styles for the solid variant means that every component solid variant will have them. To customize how a specific component look like, use the [themed components](/joy-ui/customization/themed-components/) approach instead.
-:::
diff --git a/docs/data/joy/customization/theme-typography/DefaultTypographySystem.js b/docs/data/joy/customization/theme-typography/DefaultTypographySystem.js
deleted file mode 100644
index 1c0d22a152050a..00000000000000
--- a/docs/data/joy/customization/theme-typography/DefaultTypographySystem.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import * as React from 'react';
-import { useTheme } from '@mui/joy/styles';
-
-export default function DefaultTypographySystem() {
- const theme = useTheme();
- return (
-