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
Most of the components in the starter kit are based on the [Material UI](https://material-ui.com) components. As such, they can usually be customized using the same methods as the base Material UI components.
6
+
7
+
### Changing theme variables
8
+
9
+
Variables for customizing the theme are located in the `[src/lib/theme/reactionTheme.js](https://github.com/reactioncommerce/reaction-next-starterkit/blob/master/src/lib/theme/reactionTheme.js) file. The [Material UI theme guide](https://material-ui.com/customization/themes/) has additional details on how to customize the theme.
10
+
11
+
For example, you can change the various colors used for the primary color, fonts used, layout dimensions and more. All of the [default theme variables from Material UI](https://material-ui.com/customization/default-theme/) are available to override as well as any additional variables added for the Starter Kit itself.
Styles for components can be overridden globally from the [src/lib/theme/reactionTheme.js](https://github.com/reactioncommerce/reaction-next-starterkit/blob/master/src/lib/theme/reactionTheme.js) file. **Before applying an override, consider updating the theme variables as it may provide you with better results.**
34
+
35
+
When using overrides you cannot add additional class names that aren't already present in the original component. You can add override existing CSS properties or add new CSS properties that may not exist in the original component's style.
36
+
37
+
Consult source code for that component you which to override for, both the style name used for overrides, as well as the class names that are available for customization.
38
+
39
+
40
+
For more information on how to override styles please consult the [Material UI guide on overrides](https://material-ui.com/customization/overrides/).
41
+
42
+
#### Theme overrides example
43
+
44
+
To add custom overrides, simply add an `overrides` object to the theme. The `overrides` object contains a key which matches the component name with a prefix, and the value being an object with your overrides to apply to that component.
45
+
46
+
- Starter Kit components are prefixed with `Sk` in the theme. e.g. `SkHeader`.
47
+
- Material UI components are prefixed with `Mui` in the theme. e.g. `MuiAppBar`.
0 commit comments