Mask Cursor Effect
A cursor-following mask effect that reveals hidden content on hover. Creates an engaging reveal experience.
Install using CLI
npx shadcn@latest add "https://obsidianui.dev/r/mask-cursor-effect.json"Install Manually
1
Install dependencies
2
Add util file
Create a file lib/utils.ts:
3
Copy the source code
Copy the code into components/ui/mask-cursor-effect.tsx
Usage
Props
| Prop Name | Type | Default | Description |
|---|---|---|---|
| children | React.ReactNode | - | Visible content |
| hiddenComponent | React.ReactNode | - | Content revealed on hover |
| backgroundColor | string | '#EA5A47' | Mask background color |
| expandedMaskSize | number | 350 | Mask size on hover |
