pixelated-image-hover
v0.0.1
Published
An Astro component that applies a pixelated hover effect between two images.
Maintainers
Readme
pixelated-image-hover
An Astro component that applies a pixelated hover effect between two images.
Installation 📖
# You can intall with npm
npm install pixelated-image-hover
# or with yarn
yarn add pixelated-image-hover
# or with pnpm
pnpm add pixelated-image-hoverUsage ⚙️
Reminder: the smallImage must always be exactly 10% of the bigImage’s dimensions.
For example:
- bigImage: 400x600 → smallImage: 40x60
- bigImage: 800x1200 → smallImage: 80x120
---
import PixelatedImageHover from 'pixelated-image-hover';
---
<PixelatedImageHover bigImage="width=400_height=600.avif" smallImage="width=40_height=60.avif" />
