All Projects → scottkellum → momentum

scottkellum / momentum

Licence: other
Track movement and basic events with CSS custom properties

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to momentum

Vue Parallax
🌌 Vue.js component for parallax image scroll effects
Stars: ✭ 569 (+2894.74%)
Mutual labels:  parallax, scrolling
Paroller.js
Parallax scrolling jQuery plugin
Stars: ✭ 535 (+2715.79%)
Mutual labels:  parallax, scrolling
Perspective
Powerful scrolling and motion parallax for iOS
Stars: ✭ 260 (+1268.42%)
Mutual labels:  parallax, scrolling
Parallaxscrollingview
Parallax scrolling either by offset or automatically.
Stars: ✭ 91 (+378.95%)
Mutual labels:  parallax, scrolling
svelte-parallax
a (small) spring-based parallax component library for Svelte
Stars: ✭ 87 (+357.89%)
Mutual labels:  parallax
cachu-slider
🌈 🔆 Create animated full screen and content-fit sliders efficiently.
Stars: ✭ 30 (+57.89%)
Mutual labels:  scrolling
jquery-scrollwatch
jQuery plugin for determining active sections on the page based on scrolling
Stars: ✭ 18 (-5.26%)
Mutual labels:  scrolling
whatisnewdialog
An Android library for displaying a dialog where it presents new features in the app.
Stars: ✭ 22 (+15.79%)
Mutual labels:  parallax
neodigm55
An eclectic low-code vanilla JavaScript UX micro-library for those that defiantly think for themselves.
Stars: ✭ 14 (-26.32%)
Mutual labels:  parallax
ng2-go-top-button
A simple customizable go-top-button component for Angular projects.
Stars: ✭ 18 (-5.26%)
Mutual labels:  scrolling
linearmouse
🖱 The mouse and trackpad utility for Mac.
Stars: ✭ 1,151 (+5957.89%)
Mutual labels:  scrolling
vue-in-viewport-mixin
Vue 2 mixin to determine when a DOM element is visible in the client window
Stars: ✭ 99 (+421.05%)
Mutual labels:  scrolling
react-list-any-height
React scroll list for item with any height
Stars: ✭ 12 (-36.84%)
Mutual labels:  scrolling
2DUICollectionViewSwift
A simple and elegant 2Dimensional UICollectionView which is most commonly used in ecommerce apps, music streaming apps etc. Easily customisable as per your requirements as it is designed keeping the superset requirement in mind. Developed in latest Swift syntax.
Stars: ✭ 28 (+47.37%)
Mutual labels:  scrolling
react-native-infinite-scroll
A simple implementation of infinite scrolling for React Native.
Stars: ✭ 19 (+0%)
Mutual labels:  scrolling
react-smart-scroll
Efficient rendering of long lists in React
Stars: ✭ 27 (+42.11%)
Mutual labels:  scrolling
angular-scrollspy
A simple lightweight library for Angular which automatically updates links to indicate the currently active section in the viewport
Stars: ✭ 34 (+78.95%)
Mutual labels:  scrolling
clever-infinite-scroll
A useful infinite scroll jQuery plugin. It changes title and URL automatically, it's nice for SEO.
Stars: ✭ 56 (+194.74%)
Mutual labels:  scrolling
Parallaxie
Easiest, Responsive and Customizable Parallax jQuery Plugin
Stars: ✭ 65 (+242.11%)
Mutual labels:  parallax
really-smooth-scroll
A script that smoothen scrolling in the browser
Stars: ✭ 21 (+10.53%)
Mutual labels:  scrolling

Momentum

Add page events like tracking scroll position, mouse position, device orientation, and more to your CSS! See an example of momentum in use.

Installation

Add the js inside your <head> tag.

Usage

All values are unitless meaning you will need to add your units to them. For example, calc(var(--scrolly)*1px) results in a pixel value for the vertical scroll position.

Global variables

PropertyDescription
--loaded
0 before the page is loaded, 1 when the page is done loading.
--viewportwidth
The width of the viewport.
--viewportheight
The height of the viewport.
--scrollx
Distance scrolled on the X axis.
--scrolly
Distance scrolled on the Y axis.
--clientx
Pointer coordinates on the X axis. This includes touch events.
--clienty
Pointer coordinates on the Y axis. This includes touch events.
--pointerdown
Boolean value if the pointer is up or down. Use touchpoints below for touch events.
--touchpoints
Number of touch points currently active.
--orientationalpha
Gyroscopic orientation along the alpha axis. Only avalible in some mobile browsers.
--orientationbeta
Gyroscopic orientation along the beta axis. Only avalible in some mobile browsers.
--orientationgamma
Gyroscopic orientation along the gamma axis. Only avalible in some mobile browsers.
--compassheading
Compass heading. Only avalible in some mobile browsers.
--random
A random value between 0 and 1.
--noise
A random value between 0 and 1 updated every 100ms unless otherwise specified with --noise-interval on the <body> tag.

Element variables

To trigger element variables, add the class momentumcss to your elemnt.

PropertyDescription
--width
Width of the element
--height
Height of the element
--top
Element offsetTop value
--left
Element offsetLeft value
--random
A random value between 0 and 1. This overrides the global value in the CSS cascade.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].