xxxxxxxxxx
.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
border-color: (some color);
}
xxxxxxxxxx
import { createMuiTheme, ThemeProvider } from '@material-ui/core/styles';
import TextField from '@material-ui/core/TextField';
// Create a custom theme with desired textfield border color
const theme = createMuiTheme({
palette: {
primary: {
main: '#ff0000', // Replace with desired color
},
},
});
// Wrap your component with the theme provider
function App() {
return (
<ThemeProvider theme={theme}>
<TextField label="TextField with custom border color" variant="outlined" />
</ThemeProvider>
);
}
export default App;