GithubHelp home page GithubHelp logo

anthrax3 / web-sparkle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from christinecha/web-sparkle

0.0 0.0 0.0 5.34 MB

A toolbox of frontend web development modules to add some ✨ to your website.

JavaScript 78.19% HTML 17.06% CSS 4.75%

web-sparkle's Introduction

Web Sparkle

Cha's magic toolbox of web sparkles.

Here's some lightweight modules to add some sparkle (read: finesse) to your websites. Use each of the packages below to improve important details like website performance, code style/quality, visual polish, and animations.

Usage

You can install everything all at once (since it's quite small anyway):

$ npm install web-sparkle
const SPARKLE = require('web-sparkle')

// cross-browser-resize
SPARKLE.crossBrowserResize.addListener(myFunction)
SPARKLE.crossBrowserResize.removeListener(myFunction)

// css-scroll
SPARKLE.CSSScroll(2000, 800, document.body)

// get-prefixed-style
const transition = SPARKLE.getPrefixedStyle('transition')

// resize-scroll-handler
const handler = new SPARKLE.ResizeScrollHandler()
handler.on('resize', myFunction)

// scrolled-past
new SPARKLE.ScrolledPast(200)

// universal-gallery
new SPARKLE.UniversalGallery({
  galleryNode: document.getElementById('gallery'),
  childSelector: '.slide',
  numOfClones: 1,
  shouldAutoplay: true,
  slideSpeed: 3000,
  handleChange: myFunction
})

// vh-for-mobile
new SPARKLE.VHForMobile()

Or you can go to each link below and install them separately. Up to you.

Built with 💛 by (Christine) Cha. Pull requests welcome!


cross-browser-resize

Eliminate unnecessary resize event handling on mobile browsers.

🏋 Performance
🏆 Visual Polish


css-scroll

Forget that jittery JS-powered animated scroll. Get it buttery smooth (and super performant!) with some CSS magic.

🏆 Visual Polish
🎪 Animation


get-prefixed-style

A super simple method to grab the correct (prefixed or not) style property name for your browser.

💄 Code Style


resize-scroll-handler

No more long frames. Stop repainting the browser all the time, and only fire window events once.

🏋 Performance


scrolled-past

Implement easy-peasy CSS-based scroll-triggered animation (or whatever you want).

🏋 Performance
🏆 Visual Polish
🎪 Animation


universal-gallery

Super generic, unopinionated base gallery that can be styled to pretty much any layout & animation you'll ever need.

🏋 Performance
🏆 Visual Polish
🎪 Animation


vh-for-mobile

Using VH as a CSS unit in mobile browsers causes a lot of problems. Fix them.

🏋 Performance
🏆 Visual Polish

web-sparkle's People

Contributors

christinecha avatar nickells avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.