npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

touch-flip-3d-web

v1.0.7

Published

Interactive 3D card flip

Downloads

111

Readme

TouchFlip3D 🔄

npm version npm downloads bundle size license

A high-performance, lightweight 3D Flip Card Web Component. Turn Any HTML Content into a High-Performance 3D Flip Card.

✨ The Concept: "Design Anything, We Flip It"

Unlike other libraries that force a specific design, TouchFlip3D acts as a 3D Wrapper. You have 100% control over the CSS and HTML of your cards; our library only handles the physics, touch gestures, and 3D mathematics.

✨ Features

  • Zero Dependencies: Pure Vanilla JavaScript.
  • Web Component: Encapsulated Styles using Shadow DOM.
  • Touch & Mouse Support: Smooth rotation on mobile and desktop.
  • Slot System: Complete freedom to design front and back faces.

✨ Why TouchFlip3D?

Most flip-cards are hard to customize. TouchFlip3D is different. It's a Logic Wrapper:

It doesn't style your card (You keep your design).

It only manages the 3D physics (Touch, Swipe, Mouse drag).

It works everywhere: Vanilla JS, React, Vue, Angular.

🚀 Installation

1. Option A Direct Link (No Setup Required)

Perfect for simple projects or quick tests. Just paste this in your :

<script type="module" src="https://unpkg.com/[email protected]/TouchFlip3D.js"></script>

2. Option B NPM (For Modern Projects)

Best for React, Vue, or apps with a build step:

npm install touch-flip-3d-web
  1. Import in your JavaScript
import 'touch-flip-3d-web';

🛠 Usage: Infinite Possibilities

To make it work, you only need to use the slot="front" and slot="back" attributes on any element you want. Once installed, just import the library and use the custom tag in your HTML.

Example A: A Simple Glassmorphism Card

<touch-flip-3d style="width: 300px; height: 200px;">
  <div slot="front" style="background: skyblue; border-radius: 20px;">
      <h2>Hello!</h2>
  </div>

  <div slot="back" style="background: rgba(0,0,0,0.8); color: white; border-radius: 20px;">
      <p>I am the back side</p>
  </div>
</touch-flip-3d>

Example B: Professional Product Card (Images + Buttons) Here you can see that you can put Images, Icons, and Forms inside the slots:


<touch-flip-3d style="width: 300px; height: 400px;">
  <img slot="front" src="product.jpg" style="width:100%; border-radius:15px; object-fit:cover;">

  <div slot="back" style="padding: 20px; background: #fff; border: 1px solid #ddd; border-radius:15px;">
      <h3>Awesome Watch</h3>
      <p>Price: $199</p>
      <button>Add to Cart</button>
  </div>
</touch-flip-3d>

⚙️ How it Works?

The Library: Manages rotateX, rotateY, and perspective. It listens to mouse/touch movements to calculate the 3D space.

Your Content: Stays exactly as you styled it. The library doesn't change your colors, fonts, or layout—it only adds the "Magic of 3D".

📜 License

MIT License - Feel free to use it in any project!