Black Friday: 30% off Pro

Get 30% off

Updated

Particle Carousel

Pro

Preview

Customize

Card width300px
Ratio1.25
Rounding24px
Density100
Scatter60
Glow60
Colour35
Hover trail60
Duration1.6s
Interval4.5s

Installation

Pro

Particle Carousel 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

  1. 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}" }
        }
      }
    }
  2. Put your key in .env.local and add that file to .gitignore:
    .env.local
    UIBRIK_LICENSE=your-license-key
  3. Install it:
    Terminal
    npx shadcn@latest add @uibrik-pro/particle-carousel

Usage

import { ParticleCarousel } from "@/components/uibrik/particle-carousel/particle-carousel";​const slides = [  { src: "/registry/particle-carousel/budapest-train.webp", alt: "A person boarding a train with a bicycle at a station in Budapest" },  { src: "/registry/particle-carousel/french-fountain.webp", alt: "The French Fountain in Carlton Gardens with the Royal Exhibition Building behind" },  // …2 more];​<ParticleCarousel  cardWidth={300}  ratio={1.25}  rounding={24}  density={100}  scatter={60}  glow={60}  colour={35}  trail={60}  duration={1.6}  autoplay  interval={4.5}  controls  slides={slides}  defaultIndex={0}  label="Gallery"  // index={0}  // onIndexChange={(index) => {}}/>

Where to use Particle Carousel

  • Launch and campaign heroes

    A centrepiece for dark landing pages that still reads as a gallery.

    Pairs with Lens Carousel

  • Collections and drops

    The neighbours show as glowing previews, so visitors see what comes next.

  • Portfolios

    Each change shows the photo itself coming apart and back together.

Props

ParticleCarousel
cardWidth
Type number
300
Width of the middle photo. Phones use most of the width instead.
ratio
Type number
1.25
Card height against width.
rounding
Type number
24
Corner radius of the middle photo.
density
Type number
100
Particles across one card. Low-end devices cap it at 64.
scatter
Type number
60
How loosely the side clouds hold together.
glow
Type number
60
How brightly the particles glow on dark pages. On light pages they stay solid dots.
colour
Type number
35
How far each particle's hue strays from its pixel's.
trail
Type number
60
How strongly a mouse brushes the particles aside. 0 turns it off.
duration
Type number
1.6
Length of one change. A drag scrubs it instead.
autoplay
Type boolean
true
Move on by itself. Holds on hover, focus and drag.
interval
Type number
4.5
Time between slides when autoplaying.
controls
Type boolean
true
Previous and next buttons under the carousel.
slides
Type { src: string; alt: string }[]
4 sample photos
The slides, in order, up to 32. Photos on another origin need CORS headers to reach the GPU.
index / onIndexChange
Type number / (index) => void
–
Controlled current slide, from 0.
defaultIndex
Type number
0
Slide on mount when uncontrolled.
label
Type string
"Gallery"
Names the carousel for screen readers.
className
Type string
–
Classes for the wrapper. It fills its container's width.