Nautilus

Spiral Image Carousel for React

A carousel laid out as a spiral, like the chambers of a shell: the front card is the current slide, and each card behind it is a little smaller, winding inward to a tiny tail. Every few seconds the trail moves one slot. The front card moves first and the rest follow a beat apart, so the step runs down the trail like a whip; the old front card dives out past the corner and a new one grows out of the tail. Click any card to wind it to the front, or drag sideways to turn the whole spiral by hand.

  • Gallery
  • Carousel
  • Motion

Uses clsx, tailwind-merge

Open in ChatGPTOpen in Claude
interval2.8s
duration0.90s
ripple32ms
slots14
growth1.20×
sweep300°
side
aspect0.80
align
tilt4.0°
<Nautilus />

The demo follows as you drag.

Take this demo to your coding agent.
Add this moment from KeyframeUI to our project and adapt it to our content.

Nautilus: A carousel laid out as a spiral, like the chambers of a shell: the front card is the current slide, and each card behind it is a little smaller, winding inward to a tiny tail. Every few seconds the trail moves one slot. The front card moves first and the rest follow a beat apart, so the step runs down the trail like a whip; the old front card dives out past the corner and a new one grows out of the tail. Click any card to wind it to the front, or drag sideways to turn the whole spiral by hand.
This demo, Selected Work: An architecture studio's selected work, with the project's caption, prev / next and a pause button beside the spiral.

1. Install it:
   npx shadcn@latest add @keyframeui/nautilus-demo
   (If the CLI can't find @keyframeui, use https://keyframeui.com/r/nautilus-demo.json instead.)
   It adds the demo, components/nautilus-demo.tsx, and the component, components/ui/nautilus.tsx.

2. Make it ours: our copy, data, images and colors. Keep the structure the motion depends on. If we only need the effect, use <Nautilus> on its own.

3. These props set its feel. Change them before you change the file:
   - interval (default 2.8): Seconds between steps while it plays on its own.
   - duration (default 0.9): Seconds a one-slot step takes. A longer wind takes a little longer per slot.
   - ripple (default 32): Ms each card waits after the one in front of it, so a step runs down the trail. 0 moves every card as one.
   - slots (default 14): How many cards ride the spiral.
   - growth (default 1.2): How much bigger each card is than the one behind it. Higher makes a bigger front card and a tinier tail.
   - sweep (default 300): Degrees the trail winds from the front card to the tail.
   - side (default "left"): Which side the front card sits on. The spiral winds away from it, and the old front card leaves past that side's corner.
   - aspect (default 0.8): Card width over height: 0.8 for portrait prints, 1 for covers, 1.5 for landscape.
   - align (default "center"): Where the spiral sits when the stage is wider than it needs. Hug the start or end edge to line the trail up with the page's content; set `--nautilus-align` on the stage to change it at a breakpoint (`lg:[--nautilus-align:end]`).
   - tilt (default 4): Degrees the cards lean with the curve.

4. Don't change, in components/ui/nautilus.tsx:
   - Every card sits on one spiral function of its slot `p` (0 is the front, growing toward the tail), each slot `growth` times smaller than the one in front of it, so after a step the spiral looks exactly as it did before. That is what makes the loop seamless.
   - One phase number drives every move (autoplay, clicks, keys, drag). Moves are added on top of each other as segments, so a new one starts from wherever the cards are, and each card reads the phase `ripple` ms later per slot behind the front: that delay is the ripple.
   - A card keeps its item for life (it's keyed by its place in the endless sequence), so no image is ever swapped in view: the front card leaves past the corner and a new one grows out of the tail.
   - Transform and opacity are written straight to each card in one rAF loop that stops once everything has landed; React only renders when a card enters or leaves the window.
   - Reduced motion: no autoplay and no unfurl. A step jumps the cards to their new slots and the stage fades back up; dragging still scrubs.
   Its timing is all in the TIMING block at the top of that file.

Docs: https://keyframeui.com/components/nautilus.md

Installation

Add the component on its own with the CLI, or copy the file in by hand.

The CLI writes components/ui/nautilus.tsx and installs clsx and tailwind-merge. It needs the @keyframeui registry in components.json; add it once per project.

npx shadcn@latest add @keyframeui/nautilus

Examples

Finished sections built with Nautilus. Each one installs whole, with the component included.

Up Next

A listening queue.

Take this demo to your coding agent.
Add this moment from KeyframeUI to our project and adapt it to our content.

Nautilus: A carousel laid out as a spiral, like the chambers of a shell: the front card is the current slide, and each card behind it is a little smaller, winding inward to a tiny tail. Every few seconds the trail moves one slot. The front card moves first and the rest follow a beat apart, so the step runs down the trail like a whip; the old front card dives out past the corner and a new one grows out of the tail. Click any card to wind it to the front, or drag sideways to turn the whole spiral by hand.
This demo, Up Next: A listening queue.

1. Install it:
   npx shadcn@latest add @keyframeui/nautilus-queue-demo
   (If the CLI can't find @keyframeui, use https://keyframeui.com/r/nautilus-queue-demo.json instead.)
   It adds the demo, components/nautilus-queue-demo.tsx, and the component, components/ui/nautilus.tsx.

2. Make it ours: our copy, data, images and colors. Keep the structure the motion depends on. If we only need the effect, use <Nautilus> on its own.

3. These props set its feel. Change them before you change the file:
   - interval (default 2.8): Seconds between steps while it plays on its own.
   - duration (default 0.9): Seconds a one-slot step takes. A longer wind takes a little longer per slot.
   - ripple (default 32): Ms each card waits after the one in front of it, so a step runs down the trail. 0 moves every card as one.
   - slots (default 14): How many cards ride the spiral.
   - growth (default 1.2): How much bigger each card is than the one behind it. Higher makes a bigger front card and a tinier tail.
   - sweep (default 300): Degrees the trail winds from the front card to the tail.
   - side (default "left"): Which side the front card sits on. The spiral winds away from it, and the old front card leaves past that side's corner.
   - aspect (default 0.8): Card width over height: 0.8 for portrait prints, 1 for covers, 1.5 for landscape.
   - align (default "center"): Where the spiral sits when the stage is wider than it needs. Hug the start or end edge to line the trail up with the page's content; set `--nautilus-align` on the stage to change it at a breakpoint (`lg:[--nautilus-align:end]`).
   - tilt (default 4): Degrees the cards lean with the curve.

4. Don't change, in components/ui/nautilus.tsx:
   - Every card sits on one spiral function of its slot `p` (0 is the front, growing toward the tail), each slot `growth` times smaller than the one in front of it, so after a step the spiral looks exactly as it did before. That is what makes the loop seamless.
   - One phase number drives every move (autoplay, clicks, keys, drag). Moves are added on top of each other as segments, so a new one starts from wherever the cards are, and each card reads the phase `ripple` ms later per slot behind the front: that delay is the ripple.
   - A card keeps its item for life (it's keyed by its place in the endless sequence), so no image is ever swapped in view: the front card leaves past the corner and a new one grows out of the tail.
   - Transform and opacity are written straight to each card in one rAF loop that stops once everything has landed; React only renders when a card enters or leaves the window.
   - Reduced motion: no autoplay and no unfurl. A step jumps the cards to their new slots and the stage fades back up; dragging still scrubs.
   Its timing is all in the TIMING block at the top of that file.

Docs: https://keyframeui.com/components/nautilus.md

New Arrivals

A shop's new arrivals.

Take this demo to your coding agent.
Add this moment from KeyframeUI to our project and adapt it to our content.

Nautilus: A carousel laid out as a spiral, like the chambers of a shell: the front card is the current slide, and each card behind it is a little smaller, winding inward to a tiny tail. Every few seconds the trail moves one slot. The front card moves first and the rest follow a beat apart, so the step runs down the trail like a whip; the old front card dives out past the corner and a new one grows out of the tail. Click any card to wind it to the front, or drag sideways to turn the whole spiral by hand.
This demo, New Arrivals: A shop's new arrivals.

1. Install it:
   npx shadcn@latest add @keyframeui/nautilus-shop-demo
   (If the CLI can't find @keyframeui, use https://keyframeui.com/r/nautilus-shop-demo.json instead.)
   It adds the demo, components/nautilus-shop-demo.tsx, and the component, components/ui/nautilus.tsx.

2. Make it ours: our copy, data, images and colors. Keep the structure the motion depends on. If we only need the effect, use <Nautilus> on its own.

3. These props set its feel. Change them before you change the file:
   - interval (default 2.8): Seconds between steps while it plays on its own.
   - duration (default 0.9): Seconds a one-slot step takes. A longer wind takes a little longer per slot.
   - ripple (default 32): Ms each card waits after the one in front of it, so a step runs down the trail. 0 moves every card as one.
   - slots (default 14): How many cards ride the spiral.
   - growth (default 1.2): How much bigger each card is than the one behind it. Higher makes a bigger front card and a tinier tail.
   - sweep (default 300): Degrees the trail winds from the front card to the tail.
   - side (default "left"): Which side the front card sits on. The spiral winds away from it, and the old front card leaves past that side's corner.
   - aspect (default 0.8): Card width over height: 0.8 for portrait prints, 1 for covers, 1.5 for landscape.
   - align (default "center"): Where the spiral sits when the stage is wider than it needs. Hug the start or end edge to line the trail up with the page's content; set `--nautilus-align` on the stage to change it at a breakpoint (`lg:[--nautilus-align:end]`).
   - tilt (default 4): Degrees the cards lean with the curve.

4. Don't change, in components/ui/nautilus.tsx:
   - Every card sits on one spiral function of its slot `p` (0 is the front, growing toward the tail), each slot `growth` times smaller than the one in front of it, so after a step the spiral looks exactly as it did before. That is what makes the loop seamless.
   - One phase number drives every move (autoplay, clicks, keys, drag). Moves are added on top of each other as segments, so a new one starts from wherever the cards are, and each card reads the phase `ripple` ms later per slot behind the front: that delay is the ripple.
   - A card keeps its item for life (it's keyed by its place in the endless sequence), so no image is ever swapped in view: the front card leaves past the corner and a new one grows out of the tail.
   - Transform and opacity are written straight to each card in one rAF loop that stops once everything has landed; React only renders when a card enters or leaves the window.
   - Reduced motion: no autoplay and no unfurl. A step jumps the cards to their new slots and the stage fades back up; dragging still scrubs.
   Its timing is all in the TIMING block at the top of that file.

Docs: https://keyframeui.com/components/nautilus.md

Props

items Required

TypeNautilusItem[]

The slides, front to back: { src, alt }, plus any fields your own renderItem reads. Fewer items than slots repeat along the trail. Size each image for the front card, about twice its width on screen.

index

Typenumber

The item at the front. Set it to wind the spiral there (forward when it's already in the trail, otherwise the short way); leave it out and the spiral keeps its own place.

defaultIndex

TypenumberDefault0

The item at the front on first render, when index isn't set.

onIndexChange

Type(index: number, reason: "auto" | "user") => void

Called with the new front item's index as soon as a move heads for it, and whether autoplay or a visitor moved it. Use it for a caption next to the spiral.

autoplay

TypebooleanDefaulttrue

Moves the trail one slot every interval on its own. It waits while the pointer is over the spiral, while it has focus, during a drag and off screen, and stays off under reduced motion.

paused

TypebooleanDefaultfalse

Holds autoplay, like a pause button.

interval

TypenumberDefault2.8

Seconds between steps while it plays on its own.

duration

TypenumberDefault0.9

Seconds a one-slot step takes. A longer wind takes a little longer per slot.

ripple

TypenumberDefault32

Ms each card waits after the one in front of it, so a step runs down the trail. 0 moves every card as one.

slots

TypenumberDefault14

How many cards ride the spiral.

growth

TypenumberDefault1.2

How much bigger each card is than the one behind it. Higher makes a bigger front card and a tinier tail.

sweep

TypenumberDefault300

Degrees the trail winds from the front card to the tail.

side

Type"left" | "right"Default"left"

Which side the front card sits on. The spiral winds away from it, and the old front card leaves past that side's corner.

aspect

TypenumberDefault0.8

Card width over height: 0.8 for portrait prints, 1 for covers, 1.5 for landscape.

align

Type"start" | "center" | "end"Default"center"

Where the spiral sits when the stage is wider than it needs. Hug the start or end edge to line the trail up with the page's content; set --nautilus-align on the stage to change it at a breakpoint (lg:[--nautilus-align:end]).

tilt

TypenumberDefault4

Degrees the cards lean with the curve.

label

TypestringDefault"Gallery"

Names the carousel for screen readers.

renderItem

Type(item: T, info: { index: number; echo: boolean }) => React.ReactNode

Draws a card's face instead of the plain image, for covers with a title or products with a price. echo is true for a repeat of an item already nearer the front. Faces are pictures (the spiral is hidden from screen readers and lists the items' alt text instead), so keep links and buttons outside it.

className

Typestring

Extra classes for the stage. Set its height here (28rem by default); the spiral fits itself inside. --nautilus-radius sets the card corners (0.5rem), and --nautilus-align overrides align.