UIPin
ComponentsIconsIllustrationsMotionTemplatesApps
Boards
UIPin

Free, open-source UI components, icons, illustrations, motion, templates and apps, in one search. Every item links to its source and licence.

UIPin is free. If it saved you time, you can keep it running:

Buy me a coffee
ComponentsIconsIllustrationsMotionTemplatesAppsLibrariesCompareNew this weekMCP for agentsBoardsPrivacy

Components, icons and artwork belong to their authors and are shown under their open-source licences.

Magic UI/Backlight

Media & 3D
Compiling

Theme it

Every preview, live

Brand colour

Corner radius

Font

Recolours shadcn’s tokens, Tailwind’s accent colours and colours set in the code. Red, amber and green classes stay, since they usually mean error, warning or success.

Backlight

A backlight glow effect for videos, images, and SVGs.

npx shadcn@latest add https://magicui.design/r/backlight.json
Open in v0 Docs Repo
Library
Magic UI
License
MIT
Stack
React · Tailwind CSS
Size
34 lines
Demo
From Magic UI

Code

registry/magicui/backlight.tsx

import { useId, type ReactElement } from "react"

type BacklightProps = {
  children?: ReactElement
  className?: string
  blur?: number
}

export function Backlight({ blur = 20, children, className }: BacklightProps) {
  const id = useId()

  return (
    <div className={className}>
      <svg width="0" height="0" aria-hidden="true">
        <filter id={id} y="-50%" x="-50%" width="200%" height="200%">
          <feGaussianBlur
            in="SourceGraphic"
            stdDeviation={blur}
            result="blurred"
          ></feGaussianBlur>
          <feColorMatrix
            type="saturate"
            in="blurred"
            values="4"
          ></feColorMatrix>
          <feComposite in="SourceGraphic" operator="over"></feComposite>
        </filter>
      </svg>

      <div style={{ filter: `url(#${id})` }}>{children}</div>
    </div>
  )
}

More like this

Dock

Cult UI·Navigation

Bubble Background

Animate UI·BackgroundsMIT+

Drape Background

Kokonut UI·Backgrounds

Safari Browser

Eldora UI·Media & 3D

Carousel

HextaUI·Media & 3D

Icon Cloud

Magic UI·Media & 3D

Border Trail

Motion Primitives·Cursor & effects

Card Nav

React Bits·NavigationMIT+

Ipad

Eldora UI·Media & 3D

Side Panel

Cult UI·Other

ASCII Text

React Bits·Text effectsMIT+

Glow Effect

Motion Primitives·Cursor & effects

Card Flip Hover

Eldora UI·Overlays

Blob Cursor

React Bits·Cursor & effectsMIT+

Toolbar Expandable

Motion Primitives·Navigation