DocsLiquid Glass Carousel

Liquid Glass Carousel

An infinite image row refracted through a WebGL liquid-glass lens — chromatic rim, inertial drag, and a click-to-focus expand.

Installation

pnpm dlx shadcn@latest add @componentry/liquid-glass-carousel

Usage

API Reference

PropTypeDefault
itemsLiquidGlassCarouselItem[]

Projects to show. Each item needs a title and src. Optional aspect avoids a layout jump while the image loads.

—
panelHeightnumber

Target panel height in pixels. Scaled down when the container is shorter than about twice this value.

450
gapnumber

Space between panels, in pixels.

12
backgroundstring

Clear color for the WebGL canvas. Use a hex value so framebuffer gaps match the page.

"#ffffff"
entryboolean

Play the rise-and-grow intro. Disabled automatically when the user prefers reduced motion.

true
classNamestring

Additional classes for the root container.

—
onActiveChange(index: number) => void

Fires when the centered project changes.

—
onFocusChange(focused: boolean) => void

Fires when a project expands or returns to the row.

—

Inspired by

The glass lens and snap-scrolling row are from Yousuf Soomro.

Keep in mind

This component is inspired by various open-source projects and patterns. Please verify licenses and implementation details before using in production.

Need a custom component?

I build bespoke UI components & websites tailored to your brand.

DM me on X
PreviousLayered StackNextMac Keyboard
import { LiquidGlassCarousel } from "@/components/ui/liquid-glass-carousel"
 
export default function Page() {
  return (
    <div className="h-svh w-full">
      <LiquidGlassCarousel />
    </div>
  )
}