New:Socket for Asana Is Now Available.Learn more
Get Started

@zachleat/hypercard

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zachleat/hypercard

Web component to add a three-dimensional hover effect to a card.

latest
Source
npmnpm
Version
2.0.3
Version published
Weekly downloads
42
110%
Maintainers
1
Weekly downloads
 
Created
Source

hypercard

A web component to add a three-dimensional hover effect to any arbitrary content.

Full credit to this 3D card hover effect CodePen from Mark Mironyuk.

Features

  • Respects prefers-reduced-motion.
  • Customize scale with --hypercard-scale CSS custom property.

Installation

You can install via npm (@zachleat/hypercard) or download the hypercard.js JavaScript file manually.

npm install @zachleat/hypercard --save

Add hypercard.js to your site’s JavaScript assets.

Usage

<hyper-card>Hello.</hyper-card>

Not quite as big on hover

The default value is 1.07.

<hyper-card style="--hypercard-scale: 1.03">Hello.</hyper-card>

Make it perspectivier (change amount of tilt)

The default value is min(2000px, 100vw).

<hyper-card style="--hypercard-perspective: 20vw">Hello.</hyper-card>

Make the glow more or less opaque

The default value is 0.03.

<hyper-card style="--hypercard-glow-opacity: .5">Hello.</hyper-card>

Changelog

FAQs

Package last updated on 11 Aug 2026

Related posts