@levita-js/core
v0.4.0
Published
Lightweight 3D tilt & parallax with accelerometer support
Maintainers
Readme
@levita-js/core
Lightweight 3D tilt & parallax effect for the modern web with accelerometer support.
Core engine for Levita. No dependencies, GPU-accelerated, and highly performant.
Installation
npm install @levita-js/coreQuick Start
import { Levita } from "@levita-js/core";
import "@levita-js/core/style.css";
const card = document.getElementById("card");
new Levita(card, {
glare: true,
shadow: true,
});Features
- CSS-driven — No
requestAnimationFrameloop. - ~2KB gzipped — Lightweight and fast.
- Accelerometer — Auto-detects gyroscope, handles iOS permissions.
- Multi-layer parallax — Easy depth layering with
data-levita-offset.
For full documentation and framework wrappers, visit the main repository.
