An open API service indexing awesome lists of open source software.

https://github.com/zachleat/hypercard

Web component to add a three-dimensional hover effect to a card.
https://github.com/zachleat/hypercard

Last synced: about 1 year ago
JSON representation

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

Awesome Lists containing this project

README

          

# hypercard

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

**Full credit to this [3D card hover effect CodePen](https://codepen.io/markmiro/pen/wbqMPa) from [Mark Mironyuk](https://www.markmiro.com/).**

* [Demo](https://zachleat.github.io/hypercard/demo.html)
* In use on the registration flow for [`conf.11ty.dev`](https://conf.11ty.dev/).
* [Blog post](https://www.zachleat.com/web/hypercard/)

## Features

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

## Installation

You can install via `npm` ([`@zachleat/hypercard`](https://www.npmjs.com/package/@zachleat/hypercard)) or download the `hypercard.js` JavaScript file manually.

```shell
npm install @zachleat/hypercard --save
```

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

## Usage

```html
Hello.
```

### Not quite as big on hover

The default value is `1.07`.

```html
Hello.
```