@polymer/iron-swipeable-container
TypeScript icon, indicating that this package has built-in type declarations

3.0.1 • Public • Published

Published on NPM Build status Published on webcomponents.org

<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.

See: Documentation, Demo.

Usage

Installation

npm install --save @polymer/iron-swipeable-container

In an html file

<html>
  <head>
    <script type="module">
      import '@polymer/iron-swipeable-container/iron-swipeable-container.js';
    </script>
  </head>
  <body>
    <iron-swipeable-container>
      <div>I can be swiped</div>
      <paper-card heading="Me too!"></paper-card>
    </iron-swipeable-container>
  </body>
</html>

In a Polymer 3 element

import {PolymerElement, html} from '@polymer/polymer';
import '@polymer/iron-swipeable-container/iron-swipeable-container.js';

class SampleElement extends PolymerElement {
  static get template() {
    return html`
    <iron-swipeable-container>
      <div>I can be swiped</div>
      <paper-card heading="Me too!"></paper-card>
    </iron-swipeable-container>
    `;
  }
}
customElements.define('sample-element', SampleElement);

Contributing

If you want to send a PR to this element, here are the instructions for running the tests and demo locally:

Installation

git clone https://github.com/PolymerElements/iron-swipeable-container
cd iron-swipeable-container
npm install
npm install -g polymer-cli

Running the demo locally

polymer serve --npm
open http://127.0.0.1:<port>/demo/

Running the tests

polymer test --npm

Dependencies (1)

Dev Dependencies (7)

Package Sidebar

Install

npm i @polymer/iron-swipeable-container

Weekly Downloads

4

Version

3.0.1

License

BSD-3-Clause

Unpacked Size

23.2 kB

Total Files

8

Last publish

Collaborators

  • aomarks
  • emarquez
  • sorvell
  • bicknellr
  • usergenic
  • polymer-devs
  • azakus
  • kevinpschaaf
  • justinfagnani