Bencho Originals
A portrait in dappled green light
A portrait in dappled green light, 2 of 5

Features

  • A deck of five photo cards fanned in depth: the front card is full size and the neighbours sit smaller, lifted and turned in.
  • Drag to turn the deck directly, with rubber-banding past either end. Release springs to the nearest card, nudged by your flick.
  • Tap a side card to bring it forward.
  • Cards drift gently while idle, and the front card leans away from the pointer as if pressed.
  • The photos (public/bencho/*.webp) are original generated images.

API reference

<Carousel /> from components/bencho/carousel.tsx

PropTypeDefaultDescription
slides{ src, alt }[]five sample photosCards in the deck.
defaultIndexnumber1Card in front at the start.
spreadnumber100Horizontal distance between neighbouring cards, px.
floatbooleantrueIdle drift.
tiltnumber (0–100)60How far the front card leans under the pointer.
cornernumber20Card corner radius in px.
onChange(index: number) => void—Called when the front card changes.

Keyboard interactions

TabFocuses the deck.
← / →Previous or next card.
Home / EndFirst or last card.

Accessibility

  • The deck is a region with aria-roledescription="carousel"; each card is a group with aria-roledescription="slide" and “2 of 5”.
  • Cards behind the front one are aria-hidden.
  • The front card's description and position are announced in a polite live region.

Sound & haptics

Silent by design: no audio and no vibration. All of the feedback is visual, so it works anywhere, muted or not.

Files

Written from scratch for sher.md and inspired by bencho.dev. It contains none of bencho's code or assets.