Answers for "how to change input border color on focus"

5

change border highlight color on an input text element

input:focus { 
    outline: none !important;
    border-color: #719ECE;
    box-shadow: 0 0 10px #719ECE;
}
textarea:focus { 
    outline: none !important;
    border-color: #719ECE;
    box-shadow: 0 0 10px #719ECE;
}
Posted by: Guest on May-21-2020
0

change input border color when selected

input:focus {
	outline: none;
  	border: 1px solid red;
}
Posted by: Guest on February-05-2021
1

change border color focus

state: {
    isFocused: true
}

 handleFocus = () => this.setState({isFocused: true})

 handleBlur = () => this.setState({isFocused: false})

 <TextInput
         onFocus={this.handleFocus}
         onBlur={this.handleBlur}
         style={[//Your Styles, {
             borderBottomColor: this.state.isFocused
                 ? 'black'
                 : 'red',
             borderBottomWidth: 1,
         }]}
     />
Posted by: Guest on October-12-2021

Code answers related to "how to change input border color on focus"

Browse Popular Code Answers by Language