Circular Gallery
Tiles on a ring that rotates to the front with drag inertia, keys, click and optional autorotate.
pnpm dlx @glinui/cli@latest add circular-galleryAurora
Installation
pnpm dlx @glinui/cli@latest add circular-galleryPrefer the package?
Usage
Our own design (clean-room, no upstream code). Tiles sit on a ring seen from the front: the front tile is large and sharp, the others shrink, dim and blur toward the back.
Drag has inertia and eases to the nearest tile. Positions are computed in JS and written as CSS variables from a rAF loop, so a drag causes no React renders.
Compared with CylinderCarousel: the gallery is a continuous, draggable ring with a front caption and click to focus. The carousel is a step based slide show.
Variants
glinr, plain and solid tile surfaces.
<CircularGallery variant="plain" items={items} tileWidth={110} tileHeight={140} />States
Auto rotate, paused by hover and focus.
Aurora
<CircularGallery autoRotate autoRotateInterval={2600} items={items} />In a layout
A centered section under a heading.
Browse collections
Aurora
<section aria-labelledby="collections"> <h3 id="collections">Browse collections</h3> <CircularGallery items={items} /></section>Accessibility
- A listbox with option tiles, a roving tabindex and aria-current on the front tile. Back tiles are still focusable and clicking or focusing one brings it forward.
- Arrow keys, Home and End move the front tile and focus together.
- Drag and wheel are conveniences only, every action has a key and click equivalent.
- Auto rotate pauses on hover, focus and drag and is off under reduced motion.
Keyboard Interactions
| Key | Action |
|---|---|
| ArrowRight / ArrowLeft | Next or previous tile (reversed in RTL). |
| Home / End | First or last tile. |
| Enter / click | Bring a tile to the front. |
ARIA Attributes
- `role="listbox"` and `role="option"` tiles
- `aria-current` and `aria-selected` on the front tile
- `aria-posinset` and `aria-setsize`
Reduced Motion
Easing and auto rotate only run at motion level full. Otherwise the ring snaps to the chosen tile instantly.
Affected properties
rotation easinginertiaauto rotateAPI Reference
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
items | CircularGalleryItem[] | Yes | - | Tiles. The label names the tile and captions the front one. |
value / defaultValue / onValueChange | number / number / (index) => void | - | 0 | Controlled or uncontrolled front tile index. |
radius | number | No | fits the tiles | Ring radius in pixels. |
tilt | number | No | 8 | Camera tilt in degrees. |
tileWidth / tileHeight | number | - | 150 / 190 | Tile size in pixels. |
autoRotate / autoRotateInterval | boolean / number | - | false / 3200 | Rotate on a timer. Needs motion level full, pauses on hover, focus and drag. |
wheel | boolean | No | false | Let the wheel rotate the ring. Off so page scroll is never captured. |
showCaption | boolean | No | true | Caption of the front tile. |
variant | SurfaceVariant | "default" | No | ambient (glinr) | Tile surface. |
autoRotate | boolean | No | false | Rotate on a timer. Needs motion level full. Pauses on hover, focus and drag. |
autoRotateInterval | number | No | 3200 | Milliseconds between automatic steps. |
defaultValue | number | No | 0 | Auto-generated from TypeScript source. |
label | string | No | "Gallery" | Accessible name of the gallery. |
onValueChange | (index: number) => void | No | - | Auto-generated from TypeScript source. |
tileHeight | number | No | 190 | Auto-generated from TypeScript source. |
tileWidth | number | No | 150 | Auto-generated from TypeScript source. |
value | number | No | - | Controlled front item index. |
Source
Import directly from the package or browse the source on GitHub. Click any file to view it.
Import
import { CircularGallery } from "@glinui/ui"Dependencies
@glinui/ui@glinui/motionGenerated API Snapshot
Beta
Generated API Snapshot
BetaAuto-extracted from TypeScript source in packages/ui/src/components/circular-gallery.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.
Generated: 2026-10-08T01:41:21.546Z · Full index: /docs/api-metadata
Primary Props Type
CircularGalleryProps
CircularGalleryProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
autoRotate | boolean | No | false | Rotate on a timer. Needs motion level full. Pauses on hover, focus and drag. |
autoRotateInterval | number | No | 3200 | Milliseconds between automatic steps. |
defaultValue | number | No | 0 | - |
items | CircularGalleryItem[] | Yes | - | - |
label | string | No | "Gallery" | Accessible name of the gallery. |
onValueChange | (index: number) => void | No | - | - |
radius | number | No | - | Ring radius in pixels. Defaults to a size that fits the tiles. |
showCaption | boolean | No | true | Show the caption of the front tile under the ring. |
tileHeight | number | No | 190 | - |
tileWidth | number | No | 150 | - |
tilt | number | No | 8 | Camera tilt in degrees. Positive looks down on the ring. |
value | number | No | - | Controlled front item index. |
variant | SurfaceVariant | "default" | No | - | - |
wheel | boolean | No | false | Let the wheel or trackpad rotate the ring. Off by default so page scroll is never captured. |