Answers for "how to give hover in styled components"

8

styled components hover

const Link = styled.a`
	text-decoration: none;
	color: inherit;

	&:hover {
        //your code
    }
`;
Posted by: Guest on February-07-2021
0

write hover animation for styled div

import styled, { css } from 'styled-components'

const AnimationContainer = styled.div`
  transform: translate(0%);
  transition: 0.3s ease-out;

  ${props => props.animated && css`
    &:hover {
      position: fixed;
      transform: translate(0%, -30%);
      transition: 0.3s ease-out;
    }
  `}
`

export default AnimationContainer
Posted by: Guest on May-26-2021

Code answers related to "how to give hover in styled components"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language