Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Spectra Frame, animated React component

A photo grid that rests in black and white. Pointing at a photo blooms colour out from where the pointer came in while the photo widens, its row grows and the rest dim; moving off drains the colour back to where the pointer left.

  • Free
  • Cards
  • Hover
  • Spring

Like Spectra Frame? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Spectra Frame stays free.

Play with it

Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.

Point at a photo.

Props

PropTypeDefaultWhat it does
images8 drawn scenesPhotos in reading order, each { src?, alt }. Without src a drawn scene is used. alt is the caption and accessible name.
imageCount8How many images to show (slices images).
columns4Photos per row.
gap8Gap between photos, in px.
borderRadius16Corner radius of each photo, in px.
padding0Padding round the grid, in px.
backgroundColor"transparent"Background behind the grid.
grayscaleIntensity100How grey the resting photos are, 0 to 100.
scaleAmount1.06Zoom of the open photo.
cellMinHeight128Resting row height, in px.
hoveredMinHeight176Height of the row holding the open photo, in px (the grid keeps its total height).
expandedFlex2.2How much wider the open photo grows than its neighbours.
onSelect—Called with the index when a photo is clicked or activated with the keyboard.
hint"Point at a photo."Caption under the grid. An empty string hides it.
autoplayfalseOpens each photo in turn until someone touches the grid.
className—Extra classes for the root.

Add it to your project

  1. 1

    Set up your project once

    You need a Next.js project with Tailwind CSS and the @/ import alias. In its root folder, run this once. It creates components.json and the cn() helper in src/lib/utils.ts:

    npx shadcn@latest init -d

    Starting from nothing? The Quick Start walks through the whole thing.

  2. 2

    Connect the registry

    Run this once per project. It writes the Nexus UI entry into components.json for you:

    npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"

    Type it exactly as shown. {name} is filled in by the CLI with the component you ask for, so you never replace it.

  1. 3

    Add the component

    Run this from your project root. It adds the component, the helpers it imports and its npm packages.

    npx shadcn@latest add @nexus-labs/spectra-frame
  2. 4

    Check what was added

    With a project made as in the Quick Start (a src/ folder), these files land in it:

    components/
    spectra-frame/
    index.ts
    spectra-frame.tsx
  3. 5

    Copying by hand? Skip the registry

    Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that cn() exists. Install the packages:

    npm install framer-motion

    Then show the source and create each file at the path it gives:

  4. 6

    Use it in a page

    Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:

    // src/app/page.tsx
    import { SpectraFrame } from "@/components/spectra-frame";
    
    export default function Page() {
      return (
        <main>
          <SpectraFrame />
        </main>
      );
    }

Like Spectra Frame? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Spectra Frame stays free.

About Spectra Frame

Spectra Frame is a responsive image grid where photos are desaturated to black and white by default and burst into full color on hover with an adaptive scale animation. The color reveal uses CSS filter transitions without any JavaScript per-frame work. The component has zero external dependencies and uses scoped CSS injection, with picsum placeholder images by default. Responsive columns adapt to container width, making it suitable for any grid layout within a Next.js page.

Good for

  • Photography portfolio galleries
  • Product and brand photo showcases
  • Creative agency portfolio grids
  • Visual product feature galleries