Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Curved Reel, animated React component

  • Pro
  • 3D Components
  • 3D

An endless reel of posters bent around the inside of a curve: the centre cards sit back and pinch in while the edge cards swing round and come forward. It drifts on its own, and you can drag it or fling it to coast.

Props

PropTypeDefaultWhat it does
posters—Each poster has bg, fg, big (the large glyph), small (caption) and an optional serif flag. Defaults to ten type posters.
cardSize1Size of each poster, 0.7 to 1.3. The reel gets taller with it.
gap16Space between posters in pixels, 0 to 48.
curve1How much the reel bends, 0 to 1.6. 0 lays it flat; higher swings the edge posters round and pushes the centre back.
speed38How fast the reel drifts when autoplay is on, in pixels per second, 10 to 120.
glide1How far the reel coasts after a fling, 0.3 to 3. Higher glides further.
autoplayfalseDrifts the reel at 38px per second; it pauses for 2.5 seconds after a drag or key press. Off by default: the reel moves when you drag it.

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 with your API key

    Curved Reel is a Pro item, so the CLI has to send your API key. Do this once per project:

    1. Create a key at nexus-ui.com/dashboard/api-key. Copy it straight away: it starts with nxs_ and is shown only once.
    2. In your project root, next to package.json, create a file named .env.local with this line, using your own key:
      NEXUS_API_KEY=nxs_your_key_here
    3. Open components.json and add this entry inside the outermost braces, next to "aliases". Leave {name} and ${NEXUS_API_KEY} exactly as written; the CLI fills them in:
      "registries": {
        "@nexus-labs": {
          "url": "https://www.nexus-ui.com/api/registry/{name}",
          "headers": {
            "Authorization": "Bearer ${NEXUS_API_KEY}"
          }
        }
      }

How Curved Reel works

A reel of posters on the inside of a curve: cards at the centre sit back and pinch in, cards toward the edges swing round, grow and come forward. It drifts

The source, the install command and the build prompt come with Pro.