score:0
Accepted answer
Found a way using withStyles
:
const CustomTextField = withStyles({
// Override default CSS for input
root: {
'& .MuiInput-underline': {
// Remove the ripple effect on input
'&:after': {
borderBottom: 'initial',
},
},
},
})(TextField);
...
// Usage
<CustomTextField />
Codesandbox for comparing different solutions with Button and TextField:
score:2
This solution worked for me
underline: {
"&:before": {
borderBottom: `2px solid var(--border)`,
},
"&:after": {
borderBottom: `2px solid var(--border)`,
transition: 'none',
},
"&:hover:not($disabled):not($focused):not($error):before": {
borderBottom: `2px solid var(--border)`,
},
}
Source: stackoverflow.com
Related Query
- How to disable IconButton ripple effect in Material UI?
- How to disable ripple effect on Material UI Input?
- Nesting buttons in Material UI: how to disable ripple effect of container button while clicking on a child button?
- How to disable ripple effect on primary action in react material lists
- How to disable ripple in Material Design React
- how to disable the halo effect of pressing the thumb of the material ui slider?
- Material UI Slide component - how to disable Slide Effect based on component state
- How to disable ripple in React's Material UI library's Tab Component
- How to disable a button when an input is empty?
- How to disable the hover effect of material-ui button inside of a styled component
- How to add ripple effect when clicking Card in MUI
- How to disable image fade in effect in React Native?
- How to disable underline to Material UI's datepicker in React?
- How do you conditionally disable a form input in react?
- How to change outline color of Material UI React input component?
- how to disable input on react-select?
- Material UI | How to change the font colour of a disabled input text field?
- How to disable form submit button until all input fields are filled?! ReactJS ES2015
- How to disable past dates from today date with Material ui reactjs?
- How to set the width of material ui Popper to its container's width while setting disable portal as false
- How to disable the Material UI Link API component
- How to get input value of TextField from Material UI without using onChange event?
- How to get input value of TextField from Material UI?
- How to Disable the ENTER Key in React Material UI Autocomplete form
- How to fix placeholder text within the input in material ui text field
- Material UI - how to disable select on condition
- How to Disable today's date using date pickers - material ui
- Material UI Autocomplete - disable keyboard input (on mobile)
- How to disable some specific columns from edit in react material table?
- How to add a money sign in front of my input field in Material UI
More Query from same tag
- onKeyDown gets triggered everywhere instead of only on one page
- componentDidMount unexpected token error [React.js]
- How to Load when scrolled to bottom
- Reactjs : TypeError: Cannot read property 'value' of undefined
- HTML how to properly use tooltip
- React: Multer image and data upload with using firebase function, node multer
- TextInput ignores Double Tap (Period) on React Native
- React-router not rendering dynamic component- When clicked nothing happens
- Why does State disappear only upon variable assignment?
- Doesn't change the Bizcharts Colour
- How to Start react application in production mode or in nginx server
- React TypeError: teams.map is not a function
- Can React's PureComponent use `setState`?
- How to group requests in redux-saga
- Reactjs - setState doesn't re-render after update
- How to return a string from an array using React.js useState hook
- Async and Await not working with Axios React
- setState in react functional components is not being assigned property with assigned objects
- ApolloError.js:43 Uncaught (in promise) Error: Network error: Cannot read property 'Mutation' of undefined
- In ReactJS, how can I best organize my code when iterating over non-shallow data structures
- Web Api from React component returns the json in string format
- Webpack5 config error: An appropriate loader to handle this file type
- Axios Error Networ error on request Google place api
- Conditionally rendering in React.js not working
- onclick changes all mapped items instead of just one
- How to retrieve a value from API in react js
- Where should I handle sorting in Redux App?
- How do I use the Contentful api data with React Context API (useContext in particular)?
- after axios get my setState hooks doesn't run
- Next.js – encodeURIComponent doesn't work with `/` in `getStaticPaths`