Backlight
magicui/backlightFreeComponent
A backlight glow effect for videos, images, and SVGs.
Live preview
live · rendered by the registry
Rendered by magicui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://magicui.design/r/backlight.jsonSource
1import { useId, type ReactElement } from "react"23type BacklightProps = {4 children?: ReactElement5 className?: string6 blur?: number7}89export function Backlight({ blur = 20, children, className }: BacklightProps) {10 const id = useId()1112 return (13 <div className={className}>14 <svg width="0" height="0" aria-hidden="true">15 <filter id={id} y="-50%" x="-50%" width="200%" height="200%">16 <feGaussianBlur17 in="SourceGraphic"18 stdDeviation={blur}19 result="blurred"20 ></feGaussianBlur>21 <feColorMatrix22 type="saturate"23 in="blurred"24 values="4"25 ></feColorMatrix>26 <feComposite in="SourceGraphic" operator="over"></feComposite>27 </filter>28 </svg>2930 <div style={{ filter: `url(#${id})` }}>{children}</div>31 </div>32 )33}
Files it writes
More from magicui
All 247 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Androidandroid | magicui | Components | Free | no deps | |
| Animated Beamanimated-beam | magicui | Components | Free | 1 dep | |
| Animated Circular Progress Baranimated-circular-progress-bar | magicui | Components | Free | no deps | |
| Animated Gradient Textanimated-gradient-text | magicui | Components | Free | no deps | |
| Animated Grid Patternanimated-grid-pattern | magicui | Components | Free | 1 dep | |
| Animated Listanimated-list | magicui | Components | Free | 1 dep | |
| Animated Shiny Textanimated-shiny-text | magicui | Components | Free | no deps | |
| Theme Toggleranimated-theme-toggler | magicui | Components | Free | 1 dep |
