Questions tagged [themes]

Renovating the appearance and aura of a user interface through various themes and theming techniques is closely intertwined with templating.

The absence of color gradations in the TypeScript definition of MUI5 createTheme is worth noting

Seeking to personalize my theme colors in MUI5 using TypeScript, I am utilizing the createTheme function. This function requires a palette entry in its argument object, which TypeScript specifies should be of type PaletteOptions: https://i.stack.imgur.com ...

Incorporate Bootstrap into your Bigcommerce stencil theme for seamless design integration

As a newcomer to BigCommerce's Stencil theme, I am looking for guidance on integrating Bootstrap into the theme for local development. Is it feasible to incorporate custom CSS and JS into the Stencil theme as well? ...

Can JSS support creating variables similar to Sass?

Currently, I am developing a project in React and utilizing Material-ui with JSS for styling. In Sass, we have the ability to define variables like $color: rgb(255, 255, 255) for later use. I am curious if it is possible to implement variable usage simi ...

Can the color scheme be customized for both light and dark themes in Ant Design version 5?

After creating a hook that successfully toggles between light and dark modes in Chrome's Rendering panel, I noticed that the values in the ConfigProvider remain unchanged when switching themes. Can anyone suggest a workaround to modify the design token for ...

Is it possible to alter preact-material-components to switch to mdc-theme--dark mode, thereby changing the CSS style of all descendant components?

I recently created a preact-cli app and added the following code in Header.js: document.body.classList.add('mdc-theme--dark'); However, when a user tries to switch from the light theme to the dark theme, only the background of the app changes. I've notic ...

What could be causing a JavaScript error when attempting to run "node compile.js" for my unique dijit theme?

Just recently, I discovered that it is possible to utilize Node.js in conjunction with "less" to produce a customized Dojo Dijit theme. After downloading Node, I globally installed less using the following command: npm install -g less Next, I made update ...

What is the method for implementing a distinct background in dark mode while utilizing Material UI Themes?

I am facing an issue with changing the background color when in dark mode. Here is my initial code snippet... export const myThemeOptions: ThemeOptions = { palette: { mode: "light" as PaletteMode, primary: { main: ...

What is causing the icons to be influenced by the "active" action value in the Material UI palette?

Exploring the Material UI theme and stumbled upon an unexpected issue. While experimenting with different palette options in palette > action, I noticed that the "active" value was affecting the icons inside a "List". Why is this happening? sandbox: http ...

Switch between light and dark modes with the MUI theme toggle in the header (AppBar)

I'm currently working on implementing a feature that allows users to switch between dark and light themes in my web app. The challenge I am facing is how to ensure that this theme change functionality is available throughout the entire app, not just in the ...

Creating a personalized version of Material UI with unique styles, and uploading it to my GitHub repository for universal reuse across all my projects

Seeking input on the best solution for customizing MUI themes in my React projects. Currently, I manually copy theme files from previous projects to maintain consistency in styling between MUI and my UI design. Looking to create a custom library based on M ...

Is there a way to set a higher priority over the "!important" rule on my website?

I'm encountering a strange issue with my website. I have been working on this website and am looking to change the color of the main menu hover links from white to orange. Here is the CSS related to that section: .darkheader .navigation > ul > ...

What is the best way to switch between light and dark themes with the ability to locally store the current theme?

Being new to the realm of react, I have been delving into the implementation of new features using Material-UI. One particular feature I am working on involves toggling between light and dark themes, with the current theme being stored locally within the b ...

Leveraging personalized design elements from a theme in Material UI without the need for makeStyles

Is there a way to access the theme.customElements.actionButton in MyComponent without relying on makeStyles? For instance, can I directly use className={theme.customElements.actionButton}? theme.js const theme = createMuiTheme({ customElements: { ...

Challenge with Overriding Material-UI Themes

One of the challenges I faced was overriding the <ExpansionPanelSummary/> component in Material UI to reduce margin. To achieve this, I utilized a theme with overrides. const theme = createMuiTheme({ overrides: { MuiExpansionPanelSummary: { ...

How do I display featured posts in my post stream on Wordpress, specifically using the Twentyfourteen theme?

After setting up my WordPress site with the twentyfourteen theme and creating a child theme, I began customizing my index page to achieve a specific goal. Unfortunately, I haven't been successful so far. My aim is to have featured posts appear on my homep ...

Is it possible to replace Material UI theme with a custom JSS theme?

Currently, I am utilizing JSS themes for styling my components. However, it appears that my personalized JSS theme is conflicting with the JSS theme applied to the Material UI components. The version of material-ui being used is 1.0.0-beta.22. The setup r ...

Create your own unique Semantic UI themes using the Semantic UI theme builder, complete with support for Font Awesome classnames and the ability to preview them with the

My admiration for Semantic UI and Semantic UI React knows no bounds. Not only are they phenomenal libraries, but their documentation is truly a work of art. Yet, crafting and keeping up with themes for these components can be quite the challenge. The task ...

Update the main color in the Material UI theme on the fly

I have a requirement where users should be able to choose their primary color from a list containing options like Blue, Orange, and Green. I have implemented the latest Material UI for the front-end. Currently, I am able to switch between light and dark t ...

AngularJS Material Design Tabs with See-Through Style

Is there a way to make the md-tabs of angularJs Material have transparent background for the tab names (headers)? I've tried different methods but none have worked so far. I'm under the impression that this should be the default behavior, but fo ...

Stepping into the colorful world of Material UI, exploring ways to extract vibrant

1) How can I extract a color from the palette within the Typography component? 2) Is it possible to access a specific color from the palette using an argument? Code:- 1) <Box color='common.white'> <Typography color='(I ...

bespoke theme background hue

I currently have material-ui@next installed and I am attempting to customize the background color of the theme. Here is what I have tried: const customizedTheme = createMuiTheme({ palette: createPalette({ type: 'light', primary: purple, back ...

What is the best way to turn off box-shadow for all Material UI elements across the board?

I want to remove the default box-shadow for most Material UI components. Currently, I am accomplishing this by individually setting the style for each component like so: <FloatingActionButton style={{boxShadow: "none"}} /> Is there a metho ...

Customizing a material-ui theme with withStyles() in conjunction with withTheme()

After developing a series of reusable components, I started styling them by utilizing classes prop to override the MUI classnames. To streamline the process and prevent repetition in more intricate components, I consolidated common styles into a theme. Eac ...

Leveraging createMuiTheme to customize default styles for divs, paragraphs, and the body element

Seeking guidance on customizing a Material UI Theme I aim to modify the default styles for elements like <body>. Currently, at the root of my React tree: import theme from './mui-theme' ReactDOM.render( <Router> <ThemePr ...

Is there a way to dynamically update the Material UI theme through the Redux store?

Here is a React component using a custom Material UI theme We have the following code snippet: const getTheme = name => themes.filter(theme => theme.name === name)[0] || themes[0]; const Root = props => ( <MuiThemeProvider muiTheme={getM ...

Custom breakpoints in MaterialUi are not being used as intended

After coming across this question, I decided to implement a theme that utilizes a shared config file that can be accessed by other themes as well. To start off, I focused on standardizing the breakpoints since they should remain consistent across all theme ...

Customize the shadow array values in Material UI themes by utilizing the createMuiTheme function to override default

Currently, I have a customized theme for my toolkit where I am utilizing createMuiTheme to override various properties like palette, fonts, etc. One particular challenge I am facing is in minimizing the shadow array within the theme object which contains 2 ...

The IntrinsicAttributes type does not contain a property called 'theme'

As a junior TypeScript developer, I am exploring the creation of a dark mode feature using styled-components and a custom hook in TypeScript. useDarkMode.tsx import { useState } from 'react'; export const useDarkMode = () => { const [theme, setTheme ...

What is the most effective way to alter the body tag in React/NextJS dynamically upon a state change?

I'm currently working on a unique theme system implementation using a combination of Tailwind, React, and NextJS. My approach involves dynamically updating the class name of a specific tag to reflect the current theme. While this method works well for tags ...

Universal MUI theme for various projects

After successfully creating a theme for my project using createTheme, I find myself wondering how to efficiently use that same theme for future projects without having to constantly copy it over. Upon reaching out to the Mui team with this question, their ...

Steps for incorporating a personalized theme in Material UI

For my react project, I decided to use Material UI as the component library. To customize the default theme provided by Material UI, I created my own color palette. However, even after adding a custom theme and wrapping my app.js with the ThemeProvider, ...

Troubleshooting a Navigation Styling Issue in HTML and CSS

I'm struggling to position my drop-down menus correctly in my WordPress theme navigation. They are appearing far away from the nav bar and end up near the top left corner of the screen when I hover over a ul li >. Here is the CSS code I am using: # ...

Unable to sign up for WordPress function

I'm having trouble getting my function registered properly in WordPress, no matter how many times I try. So far, here's what I've done: Inserted code into themes functions.php function test_my_script() { wp_register_script( 'custom-script', get_template ...

Styling the body element in Material UI: A guide to customizing the

I'm having trouble figuring out how to target the root elements using the ThemeProvider in Material UI. const theme = createMuiTheme({ palette: { background: { default: "#00000", backgroundColor : 'black', backgroundImag ...

The ThemeProvider does not automatically provide theme injections

After creating a theme using the createTheme method from @mui/material/styles, I attempted to apply this theme using ThemeProvider from the same package. This snippet showcases the dark theme that was created: export const darkTheme = createTheme({ pale ...

Changing the Appearance of the RStudio Editor

I am exploring options to customize an RStudio Editor Theme to personalize the colors. My current setup includes RStudio version 0.99.473 on Windows 10. After reviewing Any way to change colors in Rstudio to something other than default options?, which wa ...

Material-UI's simplification of 10px comprehension

I'm a bit confused about why we have to do this for the 10px simplification: html { font-size: 62.5%; /* 62.5% of 16px = 10px */ } Shouldn't the following code handle everything? const theme = createMuiTheme({ typography: { // Set the ...

Customize your Material UI theme colors with SASS variables

I am exploring the idea of customizing the theme of Material UI in a dynamic way by incorporating SASS Variables that would update the Material UI theme automatically. When designing my page with Sass, I typically use variables to define colors: $primary ...

Store Dark Mode preferences in the browser's local storage using React and Material-UI

Is there a way to save the dark mode setting in localStorage? Can this approach be used for storing it? Any suggestions on how to achieve this would be appreciated. Thanks, cheers! function App() { const [darkState, setDarkState] = useState("&qu ...

Troubleshooting a React Context error: Solutions and steps to resolve the issue

I am currently working on implementing React Context in my application to eliminate the need for prop drilling. However, I encountered an error while creating the contextProvider which states: "Element type is invalid: expected a string (for built-in co ...

Is there a way to incorporate a CSS file into this without explicitly mentioning the color?

I have successfully implemented a PHP solution for changing themes with a cookie that remembers the selected theme color when the user leaves the site. However, I now need to switch this functionality to JavaScript while still utilizing the CSS file. How c ...

The placement of a material-ui component at the beginning of the render method can impact the styling of the following components in the hierarchy

After creating some styled components, I noticed that they were not rendering correctly for me. However, when I transferred the code to a codesandbox environment (which had a material-ui button in the template), the components rendered perfectly fine. It w ...

Switching Themes in Material-UI Version 5: Facing Compilation Issues While Importing Styles

Currently facing an issue with using the Material UI custom theme, resulting in errors with style components. Despite having already installed npm packages like "@mui/material", "@emotion/react" and "@emotion/styled", the error persists. My project utilize ...

Create custom styles for Android applications using CSS or themes programmatically

As I work on developing an application, I am interested in implementing a unique approach... To retrieve a CSS file from the server and apply it to the activity layout. To create a string file for styling or theming and integrating it into the layout. I ...

Error: The combination of 0 and .... is invalid and cannot be used as a function

I am currently in the process of developing a next.js application using Material-ui. I have been attempting to integrate material-ui into my project. Following guidance from the official GitHub page, I have copied the _app.js , _document.js , theme.js fil ...

Struggling with TypeScript Errors while Extending Theme Colors in Material UI React using TypeScript

Just started with typescript and feeling a bit lost, can someone offer some guidance? I'm working on a React project using material-ui with typescript. To add a new color the correct way, it needs to be added to a theme: const theme = createMuiTheme({ pa ...