Updated
Curved Gallery
ProCustomize
Speed0.25/s
Gap18px
Fade14%
Card width220px
Ratio1.33
Curvature70
Perspective1.7×
Reach78°
Tilt100%
Rounding22px
left
Installation
ProCurved Gallery is a Pro component
Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.
Install with a key
- Add the Pro registry to
components.json:components.json { "registries": { "@uibrik-pro": { "url": "https://uibrik.com/r/pro/{name}.json", "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" } } } } - Put your key in
.env.localand add that file to.gitignore:.env.local UIBRIK_LICENSE=your-license-key - Install it:
Terminal npx shadcn@latest add @uibrik-pro/curved-gallery
Loading your installation…
Usage
import { CurvedGallery } from "@/components/uibrik/curved-gallery/curved-gallery";const cards = [ { src: "/registry/curved-gallery/courtyard-pool.webp", alt: "Curved white wall around a shallow pool" }, { src: "/registry/curved-gallery/white-wall-trees.webp", alt: "Two trees against a white wall" }, // …3 more];<CurvedGallery speed={0.25} gap={18} fade={14} cardWidth={220} ratio={1.33} curvature={70} perspective={1.7} reach={78} tilt={100} rounding={22} direction="left" pauseOnHover clickToFocus cards={cards}/>Where to use Curved Gallery
Photography portfolios
Cards lining a slowly turning cylinder show many images at once while one sits in focus.
Product galleries
Clicking a card brings it to the front, which works for templates, covers and product shots.
Event highlights
A looping wall of photos gives a recap page motion without autoplaying video.
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.