Skip to Content
Prisma UI - React component library
ComponentsComponentsBacklight

Backlight

An SVG-based glow effect that creates a saturated blur behind images, videos, and SVGs. Inspired by Magic UI’s Backlight .

Installation

npx shadcn@latest add https://prismaui.com/components/backlight.json

Import

import { Backlight } from '@/components/ui/backlight';

Image Glow

Wrap any image to create a vivid glow effect behind it.

Backlight demo
<Backlight className='rounded-lg'> <Image src='https://picsum.photos/320/200' alt='Example' width={320} height={200} className='rounded-lg' /> </Backlight>

Custom Blur

Adjust the blur prop to control the glow intensity.

Strong glow
<Backlight blur={40} className='rounded-lg'> <Image src='https://picsum.photos/322/204' alt='Strong glow' width={322} height={204} className='rounded-lg' /> </Backlight>

Props

PropTypeDefaultDescription
childrenReactElementThe image, video, or SVG to apply the backlight to.
classNamestringAdditional CSS classes for the wrapper.
blurnumber20Blur intensity of the glow.
Last updated on