Answers for "to to set border on div on focus in styled components"

CSS
0

focus in styled component

&:focus {
        outline: none;
        box-shadow: 0px 0px 2px red;
 }

//check for focus with in (on a child)
 &:focus-within {
    border: 2px solid #1FC2FF;
}
Posted by: Guest on August-05-2021

Browse Popular Code Answers by Language