You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/Admin.md
+14-11
Original file line number
Diff line number
Diff line change
@@ -819,28 +819,31 @@ Check the [Preferences documentation](./Store.md) for more details.
819
819
820
820
Material UI supports [theming](https://mui.com/material-ui/customization/theming/). This lets you customize the look and feel of an admin by overriding fonts, colors, and spacing. You can provide a custom Material UI theme by using the `theme` prop.
821
821
822
-
For instance, to use a dark theme by default:
822
+
React-admin comes with 4 built-in themes: [Default](./AppTheme.md#default), [Nano](./AppTheme.md#nano), [Radiant](./AppTheme.md#radiant), and [House](./AppTheme.md#house). The [e-commerce demo](https://marmelab.com/react-admin-demo/) contains a theme switcher, so you can test them in a real application.
If you want to support both a light and a dark theme, check out[the `<Admin darkTheme>` prop](#darktheme).
844
+
You can also [write your own theme](./AppTheme.md#writing-a-custom-theme) to fit your company branding. For more details on predefined and custom themes, refer to[the Application Theme chapter](./AppTheme.md).
842
845
843
-
For more details on predefined and custom themes, refer to[the Application Theme chapter](./AppTheme.md).
846
+
If you want to support both a light and a dark theme, check out[the `<Admin darkTheme>` prop](#darktheme).
Copy file name to clipboardexpand all lines: docs/AppTheme.md
+174-89
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,16 @@ title: "Application Theme"
7
7
8
8
If you want to override some styles across the entire application, you can use a custom theme, leveraging [the Material UI Theming support](https://mui.com/material-ui/customization/theming/). Custom themes let you override colors, fonts, spacing, and even the style of individual components.
9
9
10
-

10
+
The [e-commerce demo](https://marmelab.com/react-admin-demo/) contains a theme switcher, so you can test them in a real application.
With this setup, the default application theme depends on the user's system settings. If the user has chosen a dark mode in their OS, react-admin will use the dark theme. Otherwise, it will use the light theme.
84
+
85
+
In addition, users can switch from one theme to the other using [the `<ToggleThemeButton>` component](./ToggleThemeButton.md), which appears in the AppBar as soon as you define a `darkTheme` prop.
86
+
87
+
## Built-In Themes
88
+
89
+
React-admin comes with 4 built-in themes, each one having a light and a dark variant. You can use them as a starting point for your custom theme, or use them as-is.
90
+
91
+
### Default
92
+
93
+
The default theme is a good fit for every application, and works equally well on desktop and mobile.
[](./img/defaultDarkTheme1.jpg)
98
+
[](./img/defaultDarkTheme2.jpg)
99
+
100
+
You don't need to configure anything to use the default theme - it comes out of the box with react-admin.
101
+
102
+
### Nano
103
+
104
+
A dense theme with minimal chrome, ideal for complex apps. It uses a small font size, reduced spacing, text buttons, standard variant inputs, pale colors. Only fit for desktop apps.
React-admin provides the `useTheme` hook to read and update the theme programmatically. It uses the same syntax as `useState`. Its used internally by [the `<ToggleThemeButton>` component](./ToggleThemeButton.md).
With this setup, the default application theme depends on the user's system settings. If the user has chosen a dark mode in their OS, react-admin will use the dark theme. Otherwise, it will use the light theme.
200
-
201
-
In addition, users can switch from one theme to the other using [the `<ToggleThemeButton>` component](./ToggleThemeButton.md), which appears in the AppBar as soon as you define a `darkTheme` prop.
202
-
203
-
## Changing the Theme Programmatically
204
-
205
-
React-admin provides the `useTheme` hook to read and update the theme programmatically. It uses the same syntax as `useState`. Its used internally by [the `<ToggleThemeButton>` component](./ToggleThemeButton.md).
Copy file name to clipboardexpand all lines: docs/Features.md
+30-3
Original file line number
Diff line number
Diff line change
@@ -1257,7 +1257,31 @@ Check the following components for details:
1257
1257
1258
1258
The default [Material Design](https://material.io/) look and feel is nice, but a bit... Google-y. If this bothers you, or if you need to brand your app, rest assured: react-admin is fully themeable.
1259
1259
1260
-
For instance, you can use react-admin to build a [Music Player](https://demo.navidrome.org/app/):
1260
+
React-admin comes with 4 built-in themes: [Default](./AppTheme.md#default), [Nano](./AppTheme.md#nano), [Radiant](./AppTheme.md#radiant), and [House](./AppTheme.md#house). The [e-commerce demo](https://marmelab.com/react-admin-demo/) contains a theme switcher, so you can test them in a real application.
Copy file name to clipboardexpand all lines: docs/Theming.md
+7
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,13 @@ const App = () => (
119
119
);
120
120
```
121
121
122
+
React-admin comes with 4 built-in themes: [Default](./AppTheme.md#default), [Nano](./AppTheme.md#nano), [Radiant](./AppTheme.md#radiant), and [House](./AppTheme.md#house). The [e-commerce demo](https://marmelab.com/react-admin-demo/) contains a theme switcher, so you can test them in a real application.
The application theme lets you customize color, typography, spacing, and component defaults. Check the [dedicated Application Theme chapter](./AppTheme.md) for more information.
0 commit comments