Answers for "input focus border color"

0

How to change border color of textarea input on :focus

.input:focus {
    outline: none !important;
    border:1px solid red;
    box-shadow: 0 0 10px #719ECE;
  }
Posted by: Guest on September-01-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

Browse Popular Code Answers by Language