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 to change borderRadius of textfield variant=outline

See original GitHub issue

I tried this but without success. I want to change the rounded corners in the outlined textfield. <TextField name="url" value={this.state.url} InputProps={{ inputProps: { style: { textAlign: 'center', padding: 10, borderRadius: 0 }, }, style: { borderRadius: 0 }, }} variant="outlined" onChange={this.handleChange} />

Issue Analytics

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

github_iconTop GitHub Comments

105reactions
tzehecommented, Nov 11, 2018

@nicolasiensen thank you for your reply. I could achieve the same with this:

textField: {
    [`& fieldset`]: {
      borderRadius: 0,
    },
}

Thank you!

28reactions
voxmattcommented, Oct 4, 2019

For what it’s worth, this is a way to do it using withStyles.

const CustomTextField = withStyles({
  root: {
    '& .MuiOutlinedInput-root': {
      '& fieldset': {
        borderRadius: `4px 0 0 4px`,
      },
    },
  },
})(TextField);
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't change border radius of text-field variant=filled in ...
Have you tried using <FilledInput> ? const useStyles = makeStyles(theme => ({ root: { borderRadius: "50px 50px 0 0" }, container: { display: ......
Read more >
12/30 TextField Border Radius - CodeSandbox
import React from "react"; · import "./styles.css"; · import { TextField } from "@material-ui/core"; · export default function App() { · return (...
Read more >
Input - Chakra UI
Input component is a component that is used to get user input in a text field. ... You can change the border color...
Read more >
Textarea - Chakra UI
The Textarea component allows you to easily create multi-line text inputs. ... You can add resize prop to change the Textarea resize behavior....
Read more >
How to apply borderRadius on TextField Material UI - YouTube
In this video, I will show you how can you apply border-radius on TextField.If I try directly, nothing will happen there.
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