Skip to content
Discussion options

You must be logged in to vote

Good news: this already exists — it's the swipeable prop on QTabPanels (API, which even ships a "Swipeable and infinite" usage example):

<q-tab-panels
  v-model="panel"
  animated
  swipeable
  infinite
>
  <q-tab-panel name="one">...</q-tab-panel>
  <q-tab-panel name="two">...</q-tab-panel>
</q-tab-panels>

Details worth knowing:

  • swipeable goes on the container (q-tab-panels), not on individual q-tab-panels — the swipe moves between panels using the container's model.
  • Pair it with animated for transitions, and infinite if you want wrapping from the last panel back to the first.
  • vertical flips both the default transitions and the swipe axis to vertical.
  • Customize the transition direction …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by CNOCTAVE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants