Leave Yamada UI a star

Star
Yamada UIYamada UIv1.7.2

useHover

useHover is a custom hook that detects whether the pointer has moved over or away from an element.

Source@yamada-ui/use-hover

Import

import { useHover } from "@yamada-ui/react"
Copied!

Usage

Editable example

const { hovered, ref } = useHover()

return (
  <Box ref={ref} w="full" bg="red.500" p="md" rounded="md" color="white">
    {hovered ? "I am hovered" : "Put mouse over me please"}
  </Box>
)
Copied!

Edit this page on GitHub

PrevioususeFormatNumberNextuseIdle