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.

Customize border radius of different components from theme

See original GitHub issue

It would be great if we could customize the border radius of the different components from theme.

  • This is a v1.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

It would be a better theming approach to have the ability to modify the borderRadius of different types of components separately.

Current Behavior

The border-radius set in the theme is applied to all components.

Examples

The new theming option for Material Design have this in consideration

Context

I am trying to customize the theme. Something like this would be great:


const theme = {
// other stuff
  shape: {
    buttonBorderRadius: '20px',
    paperBorderRadius: '4px',
   // other shape properties...
  }
// other stuff
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
fizzvrcommented, Aug 28, 2018

What about inline… seems a simple change, don’t need no apply borderRadius to all my components:

<Button
                component={ Link }
                style={{
                  color: "#000",
                  backgroundColor: "#8bc34a",
                  borderRadius: "40px",
                  fontWeight: "600"
                }}
                to="/example"
                variant="contained"
                >
                Example
              </Button>

Overrides it’s ok, but good idea.

0reactions
mbrookescommented, Aug 28, 2018

@PolGuixe Sure - now add a shadow. 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customize border radius of different components from theme
The border-radius set in the theme is applied to all components. Examples. The new theming option for Material Design have this in consideration ......
Read more >
border-radius - CSS: Cascading Style Sheets - MDN Web Docs
The border-radius CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, ......
Read more >
The Complete Guide to Material-UI Border Radius (4 Examples)
A default design pattern in Material-UI is to create rounded corners with border radius. There are several ways to customize border radius ......
Read more >
Borders - MUI System
Use border utilities to quickly style the border and border-radius of an element. Great for images, buttons, or any other element.
Read more >
How do I change the shape of a button in MUI using theme?
There is a global border radius shape value in the theme. You can change it like this: const theme = createMuiTheme({ shape: {...
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