Skip to content

benevolent-games/swipe-snail

Repository files navigation

🐌 swipe-snail

🕹️ live demo at swipe-snail.benevolent.games

🙌 horizontal mobile-friendly website panels
📦 npm package @benev/swipe-snail


easy html-only install (without routing)

  1. paste this script into your html page's <head>

    <script defer src="https://unpkg.com/@benev/swipe-snail/x/elements.js"></script>
  2. place a snail-system and snail-panel into your html page's <body>

    <snail-system>
      <snail-panel></snail-panel>
      <snail-panel></snail-panel>
      <snail-panel></snail-panel>
    </snail-system>
  3. there are methods you can call on snail-system elements, and css properties you can set on both.

    you'll have to read the source code for more details.


advanced install (with routing)

  • routing is provided as a separate system.
  • see demo.ts as an example how to integrate swipe-snail with hash-routing