Questions tagged [themeprovider]

45 questions
5
votes
1 answer

Override Box component in createTheme

I have an application that utilizes box's in place of where divs would typically be placed to stay within the MUI ecosystem. My question is, is it possible to have a global theme override for all box components much like how you can globally…
Dylan Hoover
  • 53
  • 1
  • 4
4
votes
5 answers

changing theme with react native elements not working?

I've been working with react native elements. I want to implement a dark mode to my app but for some reason I cant get the theme prop in to change when my state in my context changes. Here is my context where I have my darkTheme and…
3
votes
1 answer

Next 13 & Tailwind Darkmode Flickering

I'm looking to achieve the results listed in this blog but with Next 13's new appDir. Flicker-free Dark Theme Toggle My darkmode flickers on refresh. // pages/_app no longer exist. How do you alter the < themeProvider > to match the new…
dankswoops
  • 103
  • 7
2
votes
0 answers

How to add a styled-components ThemeProvider in a Shadow DOM using react-shadow?

I am creating a Google Chrome extension and I have to encapsulate it in a Shadow DOM, using the react-shadow library. I want to style my app using styled-components, but the ThemeProvider doesn't seem to work as expected. What am I doing wrong…
2
votes
0 answers

Disable the App global ThemeProvider for a specific component Reactjs

I'm working on a ReactJS project where some of the components are wrapped with of Material-UI. But the App global theme overwrites the component style. Is there a way to disable the global style for a specific component?
2
votes
1 answer

rtl in material UI cause ruined my app appearance

I setup my rtl configuration step by step in v5mui. Using: emotion as styled-engine stylis v4 stylis-plugin-rtl v2 Every thing is OK but when using some complicated component my app appearance crashes. There are a warning in terminal that I think…
2
votes
2 answers

Material-UI ThemeProvider overwrites styles globally instead of only for wrapped components

I have a React Component with multiple Material-UI Selects. Now I wanted to overwrite some styles of one of them so I created a theme and now want to apply it wit the ThemeProvider. My problem is that the ThemeProvider overwrites the styles of every…
Daniel
  • 126
  • 9
2
votes
1 answer

How to get theme from store and switch the app theme on react-admin?

react-admin version: 3.8.4 I have a react-admin app and I'm trying to switch between light and dark themes. Below you can see the Theme.js where I export the two objects with default theme overrides as described on docs.…
Rian Tavares
  • 147
  • 1
  • 9
1
vote
1 answer

Dynamic Material-UI Theme Provider Color Palette hex values from either API response or values from form

i working on front end project for my company.project is based on next/reactJs with material-ui v5 as styling support. i am fairly familiar with MUIv5 ThemeProvider and its usage. As per company's latest requirements themeproviders color palette…
1
vote
0 answers

React native elements theme provider not working in testflight, but works in production mode in expo

I have a few themes throughout my app that I use for buttons, and in development and production mode on expo, all of the buttons look fine. However, when installing the app as a tester from Testflight, all of the custom themed buttons look like…
1
vote
0 answers

How can I customize palette for dark mode in MUI?

I am learning Theming in material UI. Since, I need to customize palette to get the dark mode, I am actually not sure in which way I have to customize that will trigger affect on system's background, buttons, text and stuff. I expect, your…
1
vote
0 answers

Custom Material UI theme not picked up in emotion component

Im implementing a mui theme through createStyles via ` import { createTheme, ThemeProvider } from '@mui/material/styles' which looks something like createTheme({ ...other stuff borders: { ... } }) The theme gets created fine, and when using…
1
vote
0 answers

Material UI v5 ThemeProvider typescript error when I want to change the default font

I want to change the default font of Material UI to "roboto-condensed" So firstly I used npm install @fontsource/roboto-condensed and then import "@fontsource/roboto-condensed" inside my app.js I made a file as theme.ts import { createTheme, Theme }…
sam
  • 23
  • 5
1
vote
1 answer

Style MUI component but have it's style overwritten by passed ThemeProvider

I want to style my custom React/MUI components by default, but still have the parent MUI ThemeProvider be able to override my styles. For example, let's say that I have a Button that is green by default (styled in my code), but it should be able to…
Roo
  • 259
  • 1
  • 3
  • 15
1
vote
1 answer

Using ThemeProvider in separate style sheets

I've been attempting to integrate the ThemeProvider from styled-components into an existing project. But run into the error below when accessing the theme's items in a style sheet: TypeError: Cannot read properties of undefined (reading…
Ivaldir
  • 185
  • 12
1
2 3