smooth-transitionv2
v1.0.4
Published
A lightweight utility to normalize CSS viewport units (vh) smoothly across mobile browsers with smooth transition fix.
Readme
smooth-transitionv2
A lightweight utility to normalize CSS viewport units (vh) smoothly across mobile browsers with smooth transition fix.
Installation
npm install smooth-transitionv2Usage
import { smoothTransitionV2 } from 'smooth-transitionv2';
// Use smooth transition v2 (Recommended for mobile browsers)
smoothTransitionV2({ smoothDuration: 300 });In your CSS:
.hero {
height: 100vh; /* Fallback */
height: calc(var(--vh, 1vh) * 100);
}License
MIT
