# useIsCursorOverPage

Source: https://sdk.pdf.net/docs/v1/reference/useIsCursorOverPage



Returns whether the cursor is currently over a page, and re-renders the component when that changes. Useful for cursor-dependent UI, such as hints while placing content with the `addText`, `addWidget`, or `addImage` tools.

```ts
const isCursorOverPage = useIsCursorOverPage()
```

## Example [#example]

```tsx
import { useInteractionTool, useIsCursorOverPage } from '@sdk-pdf/react'

function PlacementHint() {
  const interactionTool = useInteractionTool()
  const isCursorOverPage = useIsCursorOverPage()

  if (interactionTool.type !== 'addText' || isCursorOverPage) return null

  return <p>Move the cursor over a page to place the text.</p>
}
```

