Authors:Yoshiroh Kamiyama
Developers:Yoshiroh Kamiyama

SwapView is a container widget that represents 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 it.

Constructor Parameters

Inherited from

Parameter Type Default Description
selected Boolean false If true, the 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 id="foo" 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 id="bar" 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!