npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

simply-fades

v1.0.3

Published

Elevate your web design effortlessly with simply-fades the npm module that brings a touch of elegance through simple left and right fade-in attributes, enhancing user engagement and visual appeal.

Downloads

32

Readme

Elevate your web design effortlessly with "simply-fades" the NPM module that brings a touch of elegance through simple directional fade-in attributes, enhancing user engagement and visual appeal.

⭐️ Features

  • Simply yet elegant fade in animations
  • Ultra lightweight
  • No dependancies
  • Written purely in Typescript
  • Basic and really simple to use
  • Works everywhere, anytime

📦 Getting Started

NPM

npm i simply-fades

Yarn

yarn add simply-fades

In your project, import the SimplyFade class like so:

import { SimplyFade } from 'simply-fades'

Usage:

Note: If the element does not load, make sure you are initialising your HoverCursor after DOMContentLoaded!

document.addEventListener('DOMContentLoaded', () => {
    new SimplyFade()
})

🙋‍♂️ Example

The following code produces the behaviour displayed in the GIF.

import { SimplyFade } from 'simply-fade'

document.addEventListener('DOMContentLoaded', () => {
    new SimplyFade()
})

You define directions on attributes, by default this attribute is simply-fade, but can be changed (read below).

<div simply-fade="right">...</div>

🚀 Documentation & Properties

Documentation is still being made as the libary is still being worked on, but a brief list is below. Please note these are global values.

| Parameter | Description | Type | Default | Required? | | ---------------------- | ----------------------------------------------------------------------------------- | --------------- | ------------- | --------- | | attributeSelector | The name of the attribute to assign animations to | string | 'simply-fade' | ❌ | | offsetPx | How many pixels from the bottom of the viewport we wait until we play the animation | number | 200 | ❌ | | transitionDuration | How long the animation takes to play | number (0 to 1) | 0.5 | ❌ | | movementPx | How many pixels the element slides in | number | 50 | ❌ |

Attribute options

<div simply-fade="up">...</div>
<div simply-fade="right">...</div>
<div simply-fade="down">...</div>
<div simply-fade="left">...</div>
<div simply-fade="fade">...</div>
<!-- `simply-fade="fade"` means no horizontal or vertical movement, just fade in -->

🛣️ Roadmap (TODO)

  • Optimise build process & update build tools
  • Add option to set parameters through attributes

💎 Contribution

I extend a warm invitation to developers and enthusiasts to contribute to simply-fades. Your insights, expertise, and fresh perspectives are invaluable assets that can help me refine and enhance my work.

To get started, please review my guidelines for contributing, which can be found in the CONTRIBUTING.md file. If you encounter any issues, have questions, or need clarification, don't hesitate to reach out.