Skip to content

A container that allows any of its nested children to be swiped away.

Notifications You must be signed in to change notification settings

krumware/iron-swipeable-container

 
 

Repository files navigation

Build status

Demo and API docs

##<iron-swipeable-container>

<iron-swipeable-container> is a container that allows any of its nested children (native or custom elements) to be swiped away. By default it supports a curved or horizontal transition, but the transition duration and properties can be customized.

Example:

<iron-swipeable-container>
  <div>I can be swiped</div>
  <paper-card heading="Me too!"></paper-card>
</iron-swipeable-container>

To disable swiping on individual children, you must give them the .disable-swipe class. Alternatively, to disable swiping on the whole container, you can use its disable-swipe attribute:

<iron-swipeable-container>
  <div class="disable-swipe">I cannot be swiped be swiped</div>
  <paper-card heading="But I can!"></paper-card>
</iron-swipeable-container>

<iron-swipeable-container disable-swipe>
  <div>I cannot be swiped</div>
  <paper-card heading="Me neither :("></paper-card>
</iron-swipeable-container>

It is a good idea to disable text selection on any of the children that you want to be swiped:

.swipe {
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
}

About

A container that allows any of its nested children to be swiped away.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 100.0%