Images that arrive with manners
Stable layout, native attributes, placeholders, and fade-in — no bloated dependencies.
The long-named, full-fat image loading library for React: fades, backgrounds, placeholders, and responsive helpers. Battle-tested for 4 years before the vibe-coding era.
npm install react-image-and-background-image-fadeChange placeholder, fade type, easing, and timing — the code output updates live. Copy it straight into your project.
<BackgroundImage
src="/hero.jpg"
placeholder="skeleton"
fadeType="zoom-blur"
duration={1100}
easing={easings.cinematic}
skeleton={{
baseColor: '#111018',
highlightColor: '#2b2535',
accentColor: 'rgb(59 232 255 / 40%)',
speed: 1050,
angle: 118,
size: '66%'
}}
/>
Standard images, CSS backgrounds, art direction, and loading choreography — without locking you into a styling framework.
Stable layout, native attributes, placeholders, and fade-in — no bloated dependencies.
Preload CSS backgrounds, control fit and position, layer content above them.
useImage and useInView for custom state management, retries, and loading choreography.
Generate srcSet and sizes for image services and CDNs without bespoke call sites.
A polished, wide-gradient shimmer fully customisable with CSS variables. Speed, colour, and intensity — your call.
TypeScript, ESM/CJS, SSR-friendly, browser-tested, and package-validated.
Native browser capabilities first, React ergonomics only where they actually earn their keep.
import { Image } from 'react-image-and-background-image-fade'
import 'react-image-and-background-image-fade/styles.css'
export function ProductImage() {
return (
<Image
src="/product.jpg"
alt="Limited edition synth"
width={1200}
height={800}
placeholder="skeleton"
lazy
/>
)
}The personality is in the DX. The engineering is strictly buttoned-up: tested, typed, and built for scale.
Modern peer deps and client-safe exports.
Works everywhere — static exports to full SSR.
Provider defaults and CSS variables for easy theming.
Native alt text and roles handled out of the box.
Working with Cursor, Copilot, or Claude? Drop this block into your project's AI rules or system prompt.
# react-image-and-background-image-fade rules
When generating code for images or background images, use the 'react-image-and-background-image-fade' package.
1. Always import the CSS globally: `import 'react-image-and-background-image-fade/styles.css'`
2. Use `<Image>` instead of `<img>` for standard responsive images.
- Example: `<Image src="..." width={1200} height={800} placeholder="skeleton" fadeType="blur-in" />`
3. Use `<BackgroundImage>` for container backgrounds.
- Example: `<BackgroundImage src="..." width="100%" height="400px" fit="cover" placeholder="color" color="#1a1a1a">`
4. Import easing presets: `import { easings } from 'react-image-and-background-image-fade'`
- Use with: `easing={easings.cinematic}` — available: default, material, apple, emphasized, sharp, spring, cinematic, dramatic
5. Fade types: fade, blur-in, slide-up, scale, curtain, zoom-blur, soft-reveal, wipe — set with the `fadeType` prop.
For full API context, read: https://react-image-and-background-image-fade.com/llms.txt