Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable ripple effect on Material UI Input?

How to disable ripple or highlight color of the TextField component from Material UI in React?

enter image description here

I have tried overriding theme:

theme.props.MuiTab.disableRipple = true
theme.props.MuiButton.disableRipple = true
theme.props.MuiButtonBase.disableRipple = true

or adding custom CSS:

// disable Ripple Effect
.MuiTouchRipple-root {
display: none;
}

// disable FocusHightlight
.MuiCardActionArea-focusHighlight {
display: none;
}

based on the suggestions from the issue raised here: https://github.com/mui-org/material-ui/issues/240

Is there a way I could remove the ripple effect on the input when focused?

like image 525
Jee Mok Avatar asked Nov 01 '25 05:11

Jee Mok


1 Answers

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)`,
  },
}
like image 75
robzizo Avatar answered Nov 02 '25 22:11

robzizo