A developer is using Styled Components in a React project and needs to style a button differently based on its active state. Which feature of Styled Components should they use to achieve this?

  • &:active
  • &:focus
  • &:hover
  • &:visited
In Styled Components, the &:active pseudo-class is used to style a component when it is being activated, which is commonly associated with the active state of a button.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *