Mui dark theme
Author: M | 2025-04-24
Material UI dark / light theme with Nextjs. nextjs mui dark-light-mode mui-theme. Updated ; TypeScript; adyfk / mui-theme-simulation. Star 0. Add a description MUI - dark theme doesn't change anything. Related. 31. Material UI dark theme isn't applied to the background. 7. Applying type: 'dark' to a MUI palette breaks my site unless
Light Dark theme MUI - Codesandbox
Modern and clean mui TemplateSlim - a free and open source React dashboard template made using Material UI React component library with aim of flexibility and better customizability.Modern & Clean Responsive MUI Material-ui Admin Dashboard Template. It is fully responsive.It can be used for most type of dashboard and app templates like analytics, admin or messenger app for your desktop or mobile applications. Amazing flexibility and reusability. 85+ Demo pages ⭐ ⭐ ⭐ Do not forget to star (Top right of this page) it if you like the theme ⭐ ⭐ ⭐Support React18.Professional user interface.Material UI React components.Fully responsive, all modern browser supported.Easy to use code & folder structure.Flexible & high-Performance codeHundreds of customized MUI components.Pre-build useful pages & Apps.Dark & light modeFree SLIM MUI React js versionComplete Version PreviewClean Version PreviewVersion with only components, styles, theme and sample pageDownload from GithubGetting StartedClone from Githubgit clone StackMaterial UI V5React 18Built with React Hooks APIRedux & React Context API for State ManagementReact Router for Navigation RoutingViteCode SplittingAliasesLight/Dark theme supportEslint - airbnb style guideApexChartsIssuesTo report a bug, please submit an issue on Github. We will respond as soon as possible to resolve the issue.RoadmapPrioritiesMore components!More PagesBetter customizationBetter documentationPerformanceBundle sizeIn futureUser issues & supportTypescript versionNext/CRA/Remix versionsAccessibility.Color PresetsWe use different colorsChangelogFolder Structure Package json file.├── public├── README.md├── src│ ├── _mocks -> Mock Json data to be used for working apps│ ├── assets│ │ ├── images│ │ ├── css -> Template css files│ │ │ ├── style.css -> Application main css file│ ├── components│ │. Material UI dark / light theme with Nextjs. nextjs mui dark-light-mode mui-theme. Updated ; TypeScript; adyfk / mui-theme-simulation. Star 0. Add a description MUI - dark theme doesn't change anything. Related. 31. Material UI dark theme isn't applied to the background. 7. Applying type: 'dark' to a MUI palette breaks my site unless MUI - dark theme doesn't change anything. 0. Mui theme not applying if within a wrapper component. 1. Custom theme colors not applying in MUI. Hot Network Questions Non MUI - dark theme doesn't change anything. 11. MUI Property 'palette' does not exist on type 'Theme' 2. Using theme palette colors in custom MUI component variants with Dynamic Modes in MUI Themes. Every theme in MUI has a mode which tells the provider if the theme is light or dark. The default theme manages several values based on the mode used React Dashboard App This is an admin dashboard application with many charts and pages created using ReactJS, TailwindCSS, MUI X (for charts), PrimeReact (for datatables and other components), and Chakra UI (for tooltips)It is based on this tutorial, with using MUI X instead of SyncFusion (because MUI X is free)Technical HighlightsTailwind CSSFor basic installation and usage, see this repoThe addition here is adding custom styles in TailwindCSS (e.g. background colors)To do this:In tailwind.config.js add the needed attributes under the extend section extend: { fontSize: { 14: '14px', }, backgroundColor: { 'main-bg': '#FAFBFB', 'main-dark-bg': '#20232A', 'secondary-dark-bg': '#33373E', 'light-gray': '#F7F7F7', 'half-transparent': 'rgba(0, 0, 0, 0.5)', },To use the style in the app, simply add the className (e.g. bg-main-bg)ContextThe application state is stored using useContext hook in React. See ContextProvider.jsComponentsDatatablesSee ReactPrime DataTable and the examples in Orders.jsx and Employees.jsx and Customers.jsxInstall it using npmAdd its imports and CSS includesimport { DataTable } from "primereact/datatable";import { Column } from "primereact/column";import "primereact/resources/themes/lara-light-indigo/theme.css";Use it {ordersGrid.map((column) => ( ))}"> {ordersGrid.map((column) => ( ))}Add some options (like sorting by columns in Orders.jsx or global search in Employees.jsx or editing and selecting in Customers.jsx)ChartsLine chart: see MUI X line chart">Sparkline chart: see MUI X Sparkline chart and Ecommerce.jsx">Stacked bar chart: see MUI X Bar chart and Ecommerce.jsx">SidebarAn elegant sidebar in React is added where the navigation is done using NavLink from react-router-dom. See Sidebar.jsxResponsive, closes automatically on small screensNavbarAn elegant navbar in React is added using icons. See Navbar.jsxTheme SettingA side menu is opened for the user to choose the application theme when settings is clicked. See ThemeSettings.jsx.Implementation is done in the ContextProvide and stored in localStorage. See ContextProvider.jsUsage: see the usage of currentColor and currentModeWYSWYG EditorAdded based on PrimeReact which uses QuiliJS. See EditorComp.jsxColor PickerSwatchesPicker and SketchPicker are added based on react-color. See ColorPicker.jsxKanban ChartA Kanban chart is added in Kanban.jsx based on this repoComments
Modern and clean mui TemplateSlim - a free and open source React dashboard template made using Material UI React component library with aim of flexibility and better customizability.Modern & Clean Responsive MUI Material-ui Admin Dashboard Template. It is fully responsive.It can be used for most type of dashboard and app templates like analytics, admin or messenger app for your desktop or mobile applications. Amazing flexibility and reusability. 85+ Demo pages ⭐ ⭐ ⭐ Do not forget to star (Top right of this page) it if you like the theme ⭐ ⭐ ⭐Support React18.Professional user interface.Material UI React components.Fully responsive, all modern browser supported.Easy to use code & folder structure.Flexible & high-Performance codeHundreds of customized MUI components.Pre-build useful pages & Apps.Dark & light modeFree SLIM MUI React js versionComplete Version PreviewClean Version PreviewVersion with only components, styles, theme and sample pageDownload from GithubGetting StartedClone from Githubgit clone StackMaterial UI V5React 18Built with React Hooks APIRedux & React Context API for State ManagementReact Router for Navigation RoutingViteCode SplittingAliasesLight/Dark theme supportEslint - airbnb style guideApexChartsIssuesTo report a bug, please submit an issue on Github. We will respond as soon as possible to resolve the issue.RoadmapPrioritiesMore components!More PagesBetter customizationBetter documentationPerformanceBundle sizeIn futureUser issues & supportTypescript versionNext/CRA/Remix versionsAccessibility.Color PresetsWe use different colorsChangelogFolder Structure Package json file.├── public├── README.md├── src│ ├── _mocks -> Mock Json data to be used for working apps│ ├── assets│ │ ├── images│ │ ├── css -> Template css files│ │ │ ├── style.css -> Application main css file│ ├── components│ │
2025-04-02React Dashboard App This is an admin dashboard application with many charts and pages created using ReactJS, TailwindCSS, MUI X (for charts), PrimeReact (for datatables and other components), and Chakra UI (for tooltips)It is based on this tutorial, with using MUI X instead of SyncFusion (because MUI X is free)Technical HighlightsTailwind CSSFor basic installation and usage, see this repoThe addition here is adding custom styles in TailwindCSS (e.g. background colors)To do this:In tailwind.config.js add the needed attributes under the extend section extend: { fontSize: { 14: '14px', }, backgroundColor: { 'main-bg': '#FAFBFB', 'main-dark-bg': '#20232A', 'secondary-dark-bg': '#33373E', 'light-gray': '#F7F7F7', 'half-transparent': 'rgba(0, 0, 0, 0.5)', },To use the style in the app, simply add the className (e.g. bg-main-bg)ContextThe application state is stored using useContext hook in React. See ContextProvider.jsComponentsDatatablesSee ReactPrime DataTable and the examples in Orders.jsx and Employees.jsx and Customers.jsxInstall it using npmAdd its imports and CSS includesimport { DataTable } from "primereact/datatable";import { Column } from "primereact/column";import "primereact/resources/themes/lara-light-indigo/theme.css";Use it {ordersGrid.map((column) => ( ))}"> {ordersGrid.map((column) => ( ))}Add some options (like sorting by columns in Orders.jsx or global search in Employees.jsx or editing and selecting in Customers.jsx)ChartsLine chart: see MUI X line chart">Sparkline chart: see MUI X Sparkline chart and Ecommerce.jsx">Stacked bar chart: see MUI X Bar chart and Ecommerce.jsx">SidebarAn elegant sidebar in React is added where the navigation is done using NavLink from react-router-dom. See Sidebar.jsxResponsive, closes automatically on small screensNavbarAn elegant navbar in React is added using icons. See Navbar.jsxTheme SettingA side menu is opened for the user to choose the application theme when settings is clicked. See ThemeSettings.jsx.Implementation is done in the ContextProvide and stored in localStorage. See ContextProvider.jsUsage: see the usage of currentColor and currentModeWYSWYG EditorAdded based on PrimeReact which uses QuiliJS. See EditorComp.jsxColor PickerSwatchesPicker and SketchPicker are added based on react-color. See ColorPicker.jsxKanban ChartA Kanban chart is added in Kanban.jsx based on this repo
2025-04-07Skip to content Navigation Menu GitHub Copilot Write better code with AI Security Find and fix vulnerabilities Actions Automate any workflow Codespaces Instant dev environments Issues Plan and track work Code Review Manage code changes Discussions Collaborate outside of code Code Search Find more, search less Explore Learning Pathways Events & Webinars Ebooks & Whitepapers Customer Stories Partners Executive Insights GitHub Sponsors Fund open source developers The ReadME Project GitHub community articles Enterprise platform AI-powered developer platform Pricing Provide feedback Saved searches Use saved searches to filter your results more quickly //voltron/issues_fragments/issue_layout;ref_cta:Sign up;ref_loc:header logged out"}"> Sign up Notifications You must be signed in to change notification settings Fork 1.4k Star 4.7k DescriptionCurrent behavior 😯In dark mode, the background of the pinned columns is gray, and although it may work better in "blacker" backgrounds, it doesn't really match the theme we use in our demos.Expected behavior 🤔A different style to display pinned columns that better match different dark themes.Steps to reproduce 🕹Link to live example:Steps: your settings to display in dark modeContext 🔦No responseYour environment 🌎 npx @mui/envinfo Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here.Order ID 💳 (optional)No response
2025-04-07The Data Grid allows to support users from different locales, with formatting, RTL, and localized strings.The default locale of Material-UI is English (United States). If you want to use other locales, follow the instructions below.Translation keysYou can use the localeText prop to pass in your own text and translations.You can find all the translation keys supported in the source in the GitHub repository.In the following example, the labels of the density selector are customized.Locale textThe default locale of Material-UI is English (United States).You can use the theme to configure the locale text:import { createTheme, ThemeProvider } from '@material-ui/core/styles';import { DataGrid, bgBG } from '@mui/x-data-grid';const theme = createTheme( { palette: { primary: { main: '#1976d2' }, }, }, bgBG,);ThemeProvider theme={theme}> DataGrid />ThemeProvider>;Note that createTheme accepts any number of arguments.If you are already using the translations of the core components, you can add bgBG as a new argument.The same import works for DataGridPro as it's an extension of DataGrid.import { createTheme, ThemeProvider } from '@material-ui/core/styles';import { DataGrid, bgBG } from '@mui/x-data-grid';import { bgBG as coreBgBG } from '@material-ui/core/locale';const theme = createTheme( { palette: { primary: { main: '#1976d2' }, }, }, bgBG, coreBgBG,);ThemeProvider theme={theme}> DataGrid />ThemeProvider>;If you want to pass language translations directly to the grid without using createTheme and ThemeProvider, you can directly load the language translations from the @mui/x-data-grid or @mui/x-data-grid-pro package.import { DataGrid, nlNL } from '@mui/x-data-grid';DataGrid localeText={nlNL.props.MuiDataGrid.localeText} />;Supported localesLocaleBCP 47 language tagImport nameArabic (Sudan)ar-SDarSDBulgarianbg-BGbgBGCzechcs-CZcsCZDutchnl-NLnlNLEnglish (United States)en-USenUSFrenchfr-FRfrFRGermande-DEdeDEGreekel-GRelGRItalianit-ITitITJapaneseja-JPjaJPPolishpl-PLplPLPortuguese (Brazil)pt-BRptBRRussianru-RUruRUSlovaksk-SKskSKSpanish (Spain)es-ESesESTurkishtr-TRtrTRUkraineuk-UAukUAYou can find the source in the GitHub repository.To create your own translation or to customize the English text, copy this file to your project, make any changes needed and import the locale from there.Please do consider contributing new translations back to Material-UI by opening a pull request. However, Material-UI aims to support the 100 most popular locales. We might not accept contributions for locales that are not frequently used, for instance, gl-ES that has "only" 2.5 million native speakers.See the Docs for more details.APIDataGridDataGridPro
2025-04-06The variant prop. const StatRoot = styled('div', { name: 'MuiStat', slot: 'root',- })(({ theme }) => ({+ })(({ theme, ownerState }) => ({ display: 'flex', flexDirection: 'column', gap: theme.spacing(0.5), padding: theme.spacing(3, 4), backgroundColor: theme.palette.background.paper, borderRadius: theme.shape.borderRadius, boxShadow: theme.shadows[2], letterSpacing: '-0.025em', fontWeight: 600,+ ...ownerState.variant === 'outlined' && {+ border: `2px solid ${theme.palette.divider}`,+ }, }));4. Support theme default propsTo customize your component's default props for different projects, you need to use the useThemeProps API.+ import { useThemeProps } from '@mui/material/styles';- const Stat = React.forwardRef(function Stat(props, ref) {+ const Stat = React.forwardRef(function Stat(inProps, ref) {+ const props = useThemeProps({ props: inProps, name: 'MuiStat' }); const { value, unit, ...other } = props; return ( {value} {unit} ); });Then you can customize the default props of your component like this:import { createTheme } from '@mui/material/styles';const theme = createTheme({ components: { MuiStat: { defaultProps: { variant: 'outlined', }, }, },});TypeScriptIf you use TypeScript, you must create interfaces for the component props and ownerState:interface StatProps { value: number | string; unit: string; variant?: 'outlined';}interface StatOwnerState extends StatProps { // …key value pairs for the internal state that you want to style the slot // but don't want to expose to the users}Then you can use them in the component and slots.const StatRoot = styled('div', { name: 'MuiStat', slot: 'root',}){ ownerState: StatOwnerState }>(({ theme, ownerState }) => ({ display: 'flex', flexDirection: 'column', gap: theme.spacing(0.5), padding: theme.spacing(3, 4), backgroundColor: theme.palette.background.paper, borderRadius: theme.shape.borderRadius, boxShadow: theme.shadows[2], letterSpacing: '-0.025em', fontWeight: 600, // typed-safe access to the `variant` prop ...(ownerState.variant === 'outlined' && { border: `2px solid ${theme.palette.divider}`, boxShadow: 'none', }),}));// …do the same for other slotsconst Stat = React.forwardRefHTMLDivElement, StatProps>(function Stat(inProps, ref) { const props = useThemeProps({ props: inProps, name: 'MuiStat' }); const { value, unit, variant, ...other } = props; const ownerState = { ...props, variant }; return ( StatRoot ref={ref} ownerState={ownerState} {...other}> StatValue ownerState={ownerState}>{value}StatValue> StatUnit ownerState={ownerState}>{unit}StatUnit> StatRoot> );});Finally, add the Stat component to the theme types.import { ComponentsOverrides, ComponentsVariants, Theme as MuiTheme,} from '@mui/material/styles';import { StatProps } from 'path/to/Stat';type Theme = OmitMuiTheme, 'components'>;declare module '@mui/material/styles' { interface ComponentNameToClassKey { MuiStat: 'root' | 'value' | 'unit'; } interface ComponentsPropsList { MuiStat: PartialStatProps>; } interface Components { MuiStat?: { defaultProps?: ComponentsPropsList['MuiStat']; styleOverrides?: ComponentsOverridesTheme>['MuiStat']; variants?: ComponentsVariants['MuiStat']; }; }}TemplateThis template is the final product of the step-by-step guide above, demonstrating how to build a custom component that can be styled with the theme as if it was a built-in component.
2025-03-29