Skip to content

feat: add swipe deck block - #314

Merged
starc007 merged 1 commit into
mainfrom
feat/swipe-deck
Dec 4, 2026
Merged

starc007 merged 1 commit into
mainfrom
feat/swipe-deck

Conversation

@starc007

@starc007 starc007 commented Dec 4, 2026

Copy link
Copy Markdown
Owner

What

A new Swipe Deck block: a stack of cards you drag or fling left or right, with Pass, Undo and Like buttons.

  • The card tilts toward the side you grabbed it from (top or bottom half) and shows a Like or Pass stamp as it leans.
  • The cards behind move forward as the top card leans, and there's no jump when it's swiped away.
  • Undo while a card is still flying turns it around. Undo after it's gone brings it back in from the side it left.
  • Controlled and uncontrolled value, plus onSwipe and onUndo. An optional sound prop and labels for i18n.
  • Accessibility: a polite live region announces each decision. Only the top card can be focused (the cards behind are inert). With reduced motion the cards don't tilt and fade in place.

Files

  • components/motion/swipe-deck.tsx and components/previews/blocks/swipe-deck.preview.tsx
  • Registry entry (launchedAt 2026-12-04), summary, About, SEO, dates, and a line in the beUI v2 changelog entry
  • An a11y test case with one card swiped

Checks

  • bun run check and bun test (243 pass)
  • In the browser: drag, flick, spring-back, buttons, both undo cases, the empty state, keyboard, and touch at 375px
  • Not checked by hand: reduced motion, and swipe speed with a real trackpad or phone

@starc007
starc007 merged commit e461aca into main Dec 4, 2026
1 check passed
@starc007
starc007 deleted the feat/swipe-deck branch December 4, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant