Bencho Originals
A snowy peak above a green ridge
Mountain
Mountain, card 1 of 5

Features

  • Five photo cards stack in depth, each one further back, smaller and a little darker.
  • Press the front card, or fling it in any direction, and it drops away and goes to the back.
  • The rest step forward one place each on a spring.
  • The front card's label swaps with a short blur.
  • Auto swaps by itself on a timer and pauses while you point at the deck.
  • Fill switches the card frames and the label between light and dark.

API reference

<CardSwap /> from components/bencho/card-swap.tsx

PropTypeDefaultDescription
cards{ src, alt, label }[]five photosCards from front to back.
fill"light" | "dark""light"Frame and label colour.
autobooleanfalseSwap by itself.
everynumber (1–10)4Seconds between automatic swaps.
onSwap(index: number) => void—Called with the new front card's index.

Keyboard interactions

TabFocuses the front card.
Enter / SpaceSends the front card to the back.

Accessibility

  • Only the front card is focusable; the cards behind it are hidden from assistive tech.
  • A polite live region announces the new front card and its position.

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.