Componentregistry:componentClassic collection
Billow Gallery
An endless wall of prints that bend like paper. A slow swell rolls under the cards, they bow and twist as you drag, flick or scroll, and flutter flat again when the wall stops. Hovered cards lift on a deeper shadow. One WebGL canvas with a link list for screen readers, keyboard panning, reduced-motion support and a plain grid fallback. No dependencies.
Preview
- A muse in a white gown reading her phone
- Ruined round temple at golden hour
- Marble bust wearing headphones
- Girl with a blue and gold headscarf
- A printer pulling a sheet from a wooden press
- Pomegranates, figs and grapes in a bronze bowl
- A woman in white typing on a laptop
- A cherub carrying a paintbrush and colour swatches
- The Pantheon dome and oculus
- An old philosopher holding a computer mouse
- Marble bust of a Roman emperor
- A woman spinning cable on a spinning wheel
- Little owl on an Ionic capital
- A sculptor chiselling a face from marble
- A seated statue drawing on a tablet
- Brass armillary sphere by candlelight
- An owl perched on an old keyboard
- A marble athlete holding a laptop
drag, flick or scroll the wall · arrow keys pan · hover to lift a print
Wall
Bend1.00
Crest1.00
Depth1100px
Drift18px/s
Card width240px
Installation
$ npx shadcn@latest add @creative-ui/billow-galleryOn an older shadcn CLI, use the URL: npx shadcn@latest add https://ui.krutikraut.com/r/billow-gallery.json
Usage
Example.tsx
import { BillowGallery } from "@/components/billow-gallery"
const prints = [
{ src: "/prints/muse.webp", alt: "A muse reading her phone" },
{ src: "/prints/temple.webp", alt: "Ruined temple at golden hour", aspect: 0.8 },
{ src: "/prints/owl.webp", alt: "An owl on an old keyboard", href: "/prints/owl" },
]
export function Wall() {
return <BillowGallery items={prints} className="h-[600px] w-full bg-[#e9ebef]" />
}
// Stiffer paper, a bigger swell, no drift, and a callback instead of links.
<BillowGallery items={prints} bend={0.6} crest={1.8} drift={0} onSelect={(item) => open(item)} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| items* | BillowGalleryItem[] | — | { src, alt?, aspect?, href?, target? }. aspect is width over height; images are cropped to fill. Without it, cards cycle through a few portrait shapes. Items repeat to fill the wall. |
| columnWidth | number | 260 | Card width in px. Scaled down on containers narrower than 720 px. |
| gap | number | 56 | Space between cards in px. |
| radius | number | 10 | Card corner radius in px. |
| bend | number | 1 | How far the sheets bow and twist while the wall moves. They spring back flat with a little flutter when it stops. 0 keeps them flat. |
| crest | number | 1 | Height of the swell rolling across the wall. 0 stills it. |
| perspective | number | 1100 | Camera distance in px. Lower exaggerates the depth. |
| shadow | boolean | true | Soft shadows that lengthen as a card rides the swell or lifts. |
| shadowColor | string | "#26303d" | Shadow colour as #rrggbb. Also used for the keyboard focus ring. Match it to your wall. |
| drift | number | 18 | Idle drift in px per second. Eases to a stop while the wall is hovered or focused. 0 turns it off. |
| draggable | boolean | true | Pan by dragging or swiping, with momentum. |
| wheel | boolean | true | Pan with the mouse wheel or trackpad while hovering. |
| onSelect | (item: BillowGalleryItem, index: number) => void | — | Called when a card is clicked or tapped, not dragged. Cards with href also navigate. |
Also accepts every div prop, which is spread onto the root element.
Notes
- Give the gallery a height with
classNameorstyle. Its background shows between the cards, so set it there too. - The wall is one WebGL canvas. A visually hidden list mirrors the items for screen readers; tabbing to an entry glides its card to the centre, lifts it and rings it. Arrow keys pan the wall when it has focus.
- Images from another origin need CORS headers, since they're uploaded as WebGL textures.
- Wheel scrolling over the wall pans it instead of the page, and
touch-action: nonemakes a swipe pan it on touch screens. Leave room around a tall gallery to scroll past it, or setwheel={false}. - With reduced motion there's no swell or drift, bending is cut to a third, and moves settle at once.
- Without WebGL it falls back to a plain grid of the images.
