Glare Diagonal Effect
Original · freeA soft diagonal glare passes over the image on hover.
Copy prompt gives Claude Code, Cursor or v0 a ready-to-paste prompt that recreates this exact component.
npx shadcn@latest add https://webinnoventix.com/r/imgfx-glare-diagonal.json"use client";
export default function ImgfxGlareDiagonal() {
return (
<section className="relative w-full bg-white px-6 py-20 dark:bg-neutral-950 sm:py-28">
<style>{`
.glarefx-sheen {
background: linear-gradient(
105deg,
transparent 30%,
rgba(255, 255, 255, 0.15) 44%,
rgba(255, 255, 255, 0.55) 50%,
rgba(255, 255, 255, 0.15) 56%,
transparent 70%
);
transform: translateX(-120%);
transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
will-change: transform;
}
.glarefx-card:hover .glarefx-sheen,
.glarefx-card:focus-visible .glarefx-sheen {
transform: translateX(120%);
}
@media (prefers-reduced-motion: reduce) {
.glarefx-sheen {
transition: none;
transform: translateX(-120%);
}
.glarefx-card:hover .glarefx-sheen,
.glarefx-card:focus-visible .glarefx-sheen {
transform: translateX(-120%);
}
}
`}</style>
<div className="mx-auto flex max-w-2xl flex-col items-center text-center">
<p className="text-xs font-semibold uppercase tracking-[0.2em] text-indigo-600 dark:text-indigo-400">
Image Effect
</p>
<h2 className="mt-3 text-3xl font-semibold tracking-tight text-neutral-900 dark:text-neutral-50 sm:text-4xl">
Diagonal Glare
</h2>
<p className="mt-3 text-sm text-neutral-500 dark:text-neutral-400">
A soft band of light sweeps across the frame. Hover the photo to catch the shine.
</p>
<div
tabIndex={0}
className="glarefx-card group relative mt-10 aspect-[4/3] w-full max-w-xl cursor-pointer overflow-hidden rounded-2xl border border-neutral-200 bg-neutral-100 shadow-lg shadow-neutral-900/5 outline-none ring-offset-2 ring-offset-white transition-shadow duration-500 hover:shadow-2xl hover:shadow-neutral-900/15 focus-visible:ring-2 focus-visible:ring-indigo-500 dark:border-neutral-800 dark:bg-neutral-900 dark:shadow-black/30 dark:ring-offset-neutral-950"
>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src="/img/gallery/g14.webp"
alt="Mountain ridge glowing under low evening light"
loading="lazy"
draggable={false}
className="h-full w-full select-none object-cover transition-transform duration-[1200ms] ease-out group-hover:scale-[1.04]"
/>
<div
aria-hidden="true"
className="glarefx-sheen pointer-events-none absolute inset-0 z-10 mix-blend-screen"
/>
<div
aria-hidden="true"
className="pointer-events-none absolute inset-0 z-0 bg-gradient-to-tr from-neutral-950/30 via-transparent to-transparent"
/>
</div>
<p className="mt-5 text-xs font-medium uppercase tracking-wider text-neutral-400 dark:text-neutral-500">
Hover to reveal
</p>
</div>
</section>
);
}Dependencies
Licence
Built by Web Innoventix. Free for personal and commercial use, no attribution required.
Built by Web Innoventix
Need a custom interface, a full website, or SEO that gets you cited by AI? We design, build and rank it end to end.
Get a free quoteSimilar components
Browse all →
Hover Zoom Effect
OriginalImage zooms in smoothly inside a fixed rounded frame on hover.

Hover Zoom Out Effect
OriginalImage starts zoomed and settles to normal on hover.

Zoom Rotate Effect
OriginalImage zooms and rotates slightly on hover.

Grayscale Color Effect
OriginalGreyscale image turns to full colour on hover.

Color Grayscale Effect
OriginalFull-colour image fades to greyscale on hover.

Blur Sharp Effect
OriginalBlurred image sharpens on hover.

Sharp Blur Effect
OriginalSharp image blurs with a caption appearing on hover.

Sepia Clear Effect
OriginalSepia-toned image clears to full colour on hover.

Saturate Pop Effect
OriginalMuted image saturates and pops on hover.

Contrast Pop Effect
OriginalLow-contrast image gains punchy contrast on hover.

Brightness Lift Effect
OriginalDim image brightens on hover.

Hue Rotate Effect
OriginalImage hue-shifts through colours on hover.

