New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@stianlarsen/react-fade-effects

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stianlarsen/react-fade-effects

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

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@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

Website coming soon with examples and demos

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:

PropTypeDescription
wordsstring or string[]The text or array of words to be displayed with the fade effect.
classNamestringAdditional CSS classes to apply to the component.
filterbooleanApply a blur filter during the animation. Defaults to true.
durationnumberDuration of the animation in seconds. Defaults to 1.
staggerTimenumberTime in seconds to stagger the animation between words. Defaults to 0.1.
delaynumberDelay before the animation starts in seconds. Defaults to 0.2.
variantdefault, up, down, left, or rightThe direction of the animation. Defaults to default.
scaleSizenumberScale size for the words during the animation. Defaults to 1.
oncebooleanWhether the animation should occur only once. Defaults to true.
translateAmountnumberCustom 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.

Keywords

FAQs

Package last updated on 20 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc