uibrik

Spiral Gallery

Preview

Customize

Gap-14px
Turns2.25
Speed0.40/s
out
Blur3px
Tilt0°
Hole0%
Fade1%
Card width92px

Usage

import { SpiralGallery } from "@/components/uibrik/spiral-gallery/spiral-gallery";

<SpiralGallery />

Installation

npx shadcn@latest add https://uibrik.com/r/spiral-gallery.json
Adds the files to components/uibrik/spiral-gallery and installs motion and react-use-measure. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/spiral-gallery.

Props

SpiralGallery
gap
Type number
-14
Space between neighbouring cards along the spiral. Negative overlaps them. More space fits fewer cards.
turns
Type number
2.25
How many times the spiral winds round on its way in.
speed
Type number
0.4
Cards that flow along the spiral every second.
direction
Type "out" | "in"
"out"
Which way the cards flow: out from the middle, or in from the rim.
blur
Type number
3
Blur of a card at the middle, where it is furthest away.
tilt
Type number
0
How far cards lean as they go round.
hole
Type number
0
Size of the empty middle, as a share of the rim. Large leaves a thin ring.
fade
Type number
1
Share of a card's journey, at the rim end, spent dissolving.
cardWidth
Type number
92
Card width at the rim. Height follows at 4:5.
cards
Type { src: string; alt: string }[]
5 sample cards
The cards, in order. They repeat to fill the spiral.
className
Type string
–
Classes for the wrapper.