How to Remove the Black Border of a Textfield

Remove border from Flutter TextField

Had to modify border to this:

 border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: const BorderSide(
width: 0,
style: BorderStyle.none,
),
),

To maintain BorderRadius.circular and also dump the outline.

by hover on the text field how to remove the black border

You can add this style to set new color while hovering it

'&:hover fieldset': {
borderColor: 'grey',
},

how to remove border in textfield fieldset in material ui

InputProps can be passed to the style the variants of the inputs. For outlined input there a class named .MuiOutlinedInput-notchedOutline which sets the border in this question's case. To modify this class, pass the styles to the notchedOutline prop in InputProps.


const useStyles = makeStyles(() => ({
noBorder: {
border: "none",
},
}));

const TextInput = props => {
const { onChange, type} = props;
const classes = useStyles();

return (
<TextField
variant="outlined"
margin="normal"
required
fullWidth
id="phoneNumber"
disableUnderline={false}
// label="Phone Number"
name="phoneNumber"
autoComplete="phoneNumber"
autoFocus
classes={{notchedOutline:classes.input}}

// onChange={handlePhoneNumberChange}
className={classes.textField}
placeholder="Phone Number"
InputProps={{
startAdornment: (
<InputAdornment position="start">
<AccountCircle />
</InputAdornment>
),
classes:{notchedOutline:classes.noBorder}
}}
/>
);
};

Here is the working sandbox link: https://codesandbox.io/s/material-demo-forked-nhlde

How can I remove the black outline around my input areas?

Add outline: none; to your css for the input element.

.form-input-styling {
border-radius: 0 2em;
padding: 0 10px;
width: 50%;
border: none;
outline: none;
line-height: 2em;
margin-bottom: 20px;
background-color: #f25b43;
}

Help removing black border on focus of input button in IE

You need to set border-color to transparent to remove the border in IE. Like this:

input:focus{
border: none;
border-color: transparent;
}

Read more about it here: http://bitesizebugs.wordpress.com/2009/08/17/border-none-not-working-on-text-input-in-internet-explorer/

Swing JTextField how to remove the border?

From an answer to your previous question you know that some PL&Fs may clobber the border.

The obvious solution is to therefore override the setBorder method that the PL&F is calling, and discard the change.

JTextField text = new JTextField() {
@Override public void setBorder(Border border) {
// No!
}
};


Related Topics



Leave a reply



Submit