question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to set a hover color on Icons?

See original GitHub issue

Describe the bug Thank you very much for this library. Trying it out for the first time for a project, and I like the simplicity. Just wondering what is the best way to set a hover color? I tried _hover but that did not work? A workaround is using the css-prop. But then the themes colours are not used.

import { css } from "@emotion/core"
<Icon
  name="read"
  color="red"
  css={css`
     &:hover {
        color: white;
      }
  `}
/>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

39reactions
franklinjaviercommented, Jan 29, 2020

@secretlifeof you can find in codebase. Try _hover props

  <PseudoBox
    as="button"
    bg="teal.500"
    py={2}
    px={4}
    ml={3}
    rounded="md"
    fontWeight="semibold"
    color="white"
    _hover={{ bg: "teal.600" }}
    _focus={{ boxShadow: "outline" }}
  >
    Sign Up
  </PseudoBox>
9reactions
arubuacommented, Jun 15, 2021

How can I do the same but with transform: scale?

_hover = { { transform: “scale(1.2)” } }

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Change Icon Colors and Background Colors on Hover
Using hover effects to change the icon and background color is a good way to indicate they are clickable. In this tutorial, we're...
Read more >
Change color when hover a font awesome icon?
if you want to change only the colour of the flag on hover use this: http://jsfiddle.net/uvamhedx/ .fa-flag:hover { color: red; }
Read more >
How to create icon hover effect using CSS ? - GeeksforGeeks
1: · a:hover { css declarations; } ; 2: ·.icon:hover { background-color: blue; } ; 3: · #target:hover { transform: scale(1.5); }.
Read more >
Change icons color on hover - CodePen
Change icons color on hover ... <div class="icons-container">. 3. <img src="https://image.flaticon.com/icons/svg/733/733603.svg" alt="fb-logo" class="icon">.
Read more >
how to change image color on hover using CSS - YouTube
How to change image icon change black to white using CSS || how to change icon image white to black using CSS by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found