Sleeve Fan
A fan of album sleeves, each with a record tucked inside: drag, scroll or use the ruler to bring one into focus, then slide its record out and let it spin.
pixikit.com/docs/components/sleeve-fan
Customize
Preset
Aspect1.00
Size0.62
Spread0.58
Stack0.50
Fan6.0°
Turn22°
Depth0.50
Visible3
Radius14px
Dim0.45
Shadow0.60
Vinyl
Vinyl color
Rpm33
Autoplay
Interval4.0s
Pause on hover
Loop
Draggable
Wheel
Captions
Controls
Background color
Paused
Props
36| Name | Type | Default | Description |
|---|---|---|---|
items | SleeveFanItem[] | DEFAULT_ITEMS | The covers, in order. Title and subtitle caption the focused one; href links its title. |
preset | "sleeve" | "coverflow" | "fan" | "poster" | "rail" | "sleeve" | A named layout. Values you leave at their defaults follow it. |
startIndex | number | 0 | The cover in focus at first. |
aspect | number | 1 | Cover width divided by height. |
size | number | 0.62 | Cover height as a share of the space above the captions. |
spread | number | 0.58 | Distance between neighbouring covers, as a share of the cover width. |
stack | number | 0.5 | How much covers further out bunch up behind each other. |
fan | number | 6 | Degrees each cover leans away from the centre, like a hand of cards. |
turn | number | 22 | Degrees the side covers turn toward the centre. |
depth | number | 0.5 | How far the side covers sit back. |
visible | number | 3 | Covers shown on each side of the focused one. |
radius | number | 14 | Corner rounding of the covers, in pixels. |
dim | number | 0.45 | How much the covers away from the centre fade into the background. Hovering one brings it back. |
shadow | number | 0.6 | Strength of the shadow under the covers. |
vinyl | boolean | true | Each cover holds a record: hovering the focused cover lets it peek out, clicking it, Enter or the play button slides it out and spins it. |
vinylColor | string | "#131116" | Color of the record. |
accentColor | string | "auto" | Color of the play button and the record label. 'auto' takes it from the focused cover. |
rpm | number | 33 | Turns per minute of a playing record. |
autoplay | boolean | true | Moves to the next cover every interval seconds. Pauses while hovered, held or playing. |
interval | number | 4 | Seconds between automatic moves. |
pauseOnHover | boolean | true | Pauses autoplay while the pointer is over the rail. |
loop | boolean | true | Wraps from the last cover back to the first. |
draggable | boolean | true | Drag or swipe the covers sideways, with momentum and snapping. |
wheel | boolean | true | Scroll to move one cover per notch. Set false to leave page scrolling untouched. |
captions | boolean | true | Shows the title and subtitle of the focused cover. |
controls | boolean | true | Shows the ruler: one tick per cover, a play button at its centre and arrows at its ends. Drag or click it to scrub. |
backgroundColor | string | "transparent" | Color behind the rail. |
paused | boolean | false | Freezes autoplay and the spinning record. |
dpr | number | 2 | Kept for parity with canvas galleries; this one is drawn by the browser at its own pixel ratio. |
ariaLabel | string | "Album covers" | Label announced for the rail. |
onIndexChange | (index: number) => void | None | Called when the focused cover changes. |
onSelect | (item: SleeveFanItem, index: number) => void | None | Called when the focused cover is clicked or Enter is pressed. |
onPlayChange | (index: number, playing: boolean) => void | None | Called when a record starts or stops playing. |
ref | Ref<SleeveFanHandle> | None | Handle with next, previous, goTo, play and stop. |
className | string | None | |
style | CSSProperties | None |