Skip to content
PixiKit

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
NameTypeDefaultDescription
itemsSleeveFanItem[]DEFAULT_ITEMSThe 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.
startIndexnumber0The cover in focus at first.
aspectnumber1Cover width divided by height.
sizenumber0.62Cover height as a share of the space above the captions.
spreadnumber0.58Distance between neighbouring covers, as a share of the cover width.
stacknumber0.5How much covers further out bunch up behind each other.
fannumber6Degrees each cover leans away from the centre, like a hand of cards.
turnnumber22Degrees the side covers turn toward the centre.
depthnumber0.5How far the side covers sit back.
visiblenumber3Covers shown on each side of the focused one.
radiusnumber14Corner rounding of the covers, in pixels.
dimnumber0.45How much the covers away from the centre fade into the background. Hovering one brings it back.
shadownumber0.6Strength of the shadow under the covers.
vinylbooleantrueEach 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.
vinylColorstring"#131116"Color of the record.
accentColorstring"auto"Color of the play button and the record label. 'auto' takes it from the focused cover.
rpmnumber33Turns per minute of a playing record.
autoplaybooleantrueMoves to the next cover every interval seconds. Pauses while hovered, held or playing.
intervalnumber4Seconds between automatic moves.
pauseOnHoverbooleantruePauses autoplay while the pointer is over the rail.
loopbooleantrueWraps from the last cover back to the first.
draggablebooleantrueDrag or swipe the covers sideways, with momentum and snapping.
wheelbooleantrueScroll to move one cover per notch. Set false to leave page scrolling untouched.
captionsbooleantrueShows the title and subtitle of the focused cover.
controlsbooleantrueShows the ruler: one tick per cover, a play button at its centre and arrows at its ends. Drag or click it to scrub.
backgroundColorstring"transparent"Color behind the rail.
pausedbooleanfalseFreezes autoplay and the spinning record.
dprnumber2Kept for parity with canvas galleries; this one is drawn by the browser at its own pixel ratio.
ariaLabelstring"Album covers"Label announced for the rail.
onIndexChange(index: number) => voidNoneCalled when the focused cover changes.
onSelect(item: SleeveFanItem, index: number) => voidNoneCalled when the focused cover is clicked or Enter is pressed.
onPlayChange(index: number, playing: boolean) => voidNoneCalled when a record starts or stops playing.
refRef<SleeveFanHandle>NoneHandle with next, previous, goTo, play and stop.
classNamestringNone
styleCSSPropertiesNone

Related