question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do I customize components as part of the theme? (border radius, gradients, font family, etc)

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

Hello, I’m trying to brand an app we are working on that was made with Admin on Rest and Material UI. I’ve been reading through the Material UI docs and have been trying to put together a theme but I’m having difficulty adjusting certain styles.

I’ve been using this as a reference but it seems to be missing many properties/properties aren’t working when I add them https://github.com/mui-org/material-ui/blob/master/src/styles/getMuiTheme.js

Here are a few of the things I’m trying to do but can’t figure out how:

  • Make the background color of buttons a gradient
  • Add a border radius to buttons
  • Use a different font for titles and the AppBar

This is an example from my theme.js file:

{
  appBar: {
    fontFamily: 'Karla, sans-serif',
    titleFontWeight: 800,
  },
  button: {
    background: 'linear-gradient(0deg, red, blue)',
    borderRadius: '50px'  
  }
}

Certain things work like the titleFontWeight but not others like fontFamily (I tried titleFontFamily as well).

I must be missing something because I couldn’t find a way to do these in the docs, could someone please point me in the right direction?

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dandvcommented, Jul 22, 2020
0reactions
jordanransoncommented, Apr 5, 2018

@mbrookes Thanks for the reply. I’ll move this discussion to the Admin on Rest repository to see when they’re planning on upgrading.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I customize components as part of the theme? (border ...
Make the background color of buttons a gradient; Add a border radius to buttons; Use a different font for titles and the AppBar....
Read more >
Customize Theme - Ant Design
Ant Design allows you to customize our design tokens to satisfy UI diversity from business or brand requirements, including primary color, border radius, ......
Read more >
Theme Configuration - Tailwind CSS
The theme section of your tailwind.config.js file is where you define your project's color palette, type scale, fonts, breakpoints, border radius values, ...
Read more >
Theming Bootstrap
Customize Bootstrap 4 with our new built-in Sass variables for global style preferences for easy theming and component changes.
Read more >
Theme object | Mantine
Theme object. Mantine theme is an object where your application's colors, fonts, spacing, border-radius and other design tokens are stored.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found