Authors:Yoshiroh Kamiyama
Developers:Yoshiroh Kamiyama


SwapView is a container widget which represents an entire mobile device screen, and can be swiped horizontally. (In dojo-1.6, it was called ‘FlippableView’.) SwapView is a subclass of SwapView allows the user to swipe the screen left or right to move between the views. When SwapView is swiped, it finds an adjacent SwapView to open. When the transition is done, a topic “/dojox/mobile/viewChanged” is published.

Constructor Parameters

Inherited from

Parameter Type Default Description
selected Boolean false If true, this view is displayed at startup time.


Basic usage is the same as for View transition will be performed in the order you place SwapViews in a page.


Declarative example

In this example, there are two SwapViews, and the user can swipe the screen to move the views back and forth.

<div data-dojo-type="">
  <h2 data-dojo-type="">Page flipping demo</h2>
  <div data-dojo-type="">
    Swipe the screen left or right to flip between the views.

<div data-dojo-type="">
  <h1 data-dojo-type="">View 2</h1>
  <div data-dojo-type="">
    View 2
Error in the documentation? Can’t find what you are looking for? Let us know!