Deck Controlled 1 - Controlled index

Pro

Deck with controlled current index and external next button.

Shadcn Deck Controlled 1 component

Component Data

  • ID:deck/deck-controlled-1
  • Access:pro
  • Created:Jul 30, 2026
  • Type:example

Deck Controlled 1 component design & features

This example controls DeckCards with currentIndex and onCurrentIndexChange, advancing from an external button.

Controlled decks help when swipe gestures and keyboard or button navigation must stay in sync.