uibrik

Curved Gallery

Preview

Customize

Speed0.25/s
Gap18px
Fade14%
Card width220px
Ratio1.33
Curvature70
Perspective1.7×
Reach78°
Tilt100%
Rounding22px
left

Usage

import { CurvedGallery } from "@/components/uibrik/curved-gallery/curved-gallery";

<CurvedGallery />

Installation

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

Props

CurvedGallery
speed
Type number
0.25
Cards that pass the middle every second. Pauses while the pointer is over the gallery.
gap
Type number
18
Space between neighbouring cards at the middle.
fade
Type number
14
Share of the width, per side, that dissolves into the background.
cardWidth
Type number
220
Card width.
ratio
Type number
1.33
Card height against its width.
curvature
Type number
70
How tightly the wall bends. Low is nearly flat, high is a tight drum.
perspective
Type number
1.7
How strong the sense of depth is, as a multiple of the drum's radius. Lower is stronger.
reach
Type number
78
How far round the drum cards show before they are hidden.
tilt
Type number
100
How much the cards turn to face the centre. 0 keeps them flat on.
rounding
Type number
22
Corner radius of a card.
direction
Type "left" | "right"
"left"
Which way the wall turns.
pauseOnHover
Type boolean
true
Settle while the pointer is over the gallery.
clickToFocus
Type boolean
true
Clicking a card turns it to the middle.
cards
Type { src: string; alt: string }[]
5 sample cards
The cards, in order. They repeat to go all the way round.
className
Type string
–
Classes for the wrapper.