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

@stianlarsen/react-fade-effects

v1.0.5

Published

A collection of React components for smooth fade-in animations, starting with FadeWords. Easily add fade effects to your UI elements with customizable options.

Downloads

323

Readme

@stianlarsen/react-fade-effects

npm version

A versatile React library for applying various fade-in effects to your UI components. Starting with the FadeWords component, this library will grow to include multiple fade-related components, such as fading text, images, children elements, and more.

Preview

Text effect Component

_A preview of @stianlarsen/react-face-effects

Check out the website for demos, examples, and further info.

Features

  • Smooth Fade Animations: Easily create engaging fade-in effects for different types of UI elements.
  • Highly Configurable: Adjust the animation's duration, delay, stagger time, and more to match your design needs.
  • Ease of Integration: Drop the components into your project and customize them with minimal setup.
  • Built with TypeScript: Ensures type safety and a better development experience.

Installation

Install the package using npm:

npm install @stianlarsen/react-fade-effects

Or using yarn:

yarn add @stianlarsen/react-fade-effects

Usage

FadeWords Component

The FadeWords component allows you to create smooth fade-in effects for text.

Example

import { FadeWords } from "@stianlarsen/react-fade-effects";

function App() {
  return (
    <FadeWords
      words="Effortless Task Management with TaskBuddy"
      duration={1}
      delay={0.2}
      variant="up"
      scaleSize={1.05}
    />
  );
}

FadeWords Component Props

The FadeWords component accepts several props to customize its behavior and appearance:

| Prop | Type | Description | | ----------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------- | | words | string | The text to be displayed with the fade effect. | | className | string | Additional CSS classes to apply to the component. | | filter | boolean | Apply a blur filter during the animation. Defaults to true. | | duration | number | Duration of the animation in seconds. Defaults to 1. | | staggerTime | number | Time in seconds to stagger the animation between words. Defaults to 0.1. | | delay | number | Delay before the animation starts in seconds. Defaults to 0.2. | | variant | default, up, down, left, or right | The direction of the animation. Defaults to default. | | scaleSize | number | Scale size for the words during the animation. Defaults to 1. | | once | boolean | Whether the animation should occur only once. Defaults to true. | | translateAmount | number | Custom translate value for the animation. Defaults to 15 for up/down and 15 for left/right. |

Future Components

This package is designed to expand with additional fade components, such as:

  • FadeChildren: Apply fade-in effects to child elements within a container.
  • FadeImages: Animate image elements with fade effects.
  • FadeContainers: Apply fades to entire sections or containers.

Each future component will come with its own set of customizable props, following the same flexible design as FadeWords.

Contributing

Contributions are always welcome! Please feel free to open issues or submit pull requests.

License

@stianlarsen/react-fade-effects is MIT licensed.

Contact

For any questions or suggestions, feel free to reach out.