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

react-svg-reveal

v1.0.1

Published

React SVG Reveal is a lightweight and customizable React component that allows you to create SVG reveal animations. With this component, you can gradually reveal text in a visually appealing way, adding an element of suspense and elegance to your web proj

Downloads

27

Readme

React SVG Reveal Animation

Description

React SVG Reveal is a lightweight and customizable React component that allows you to create SVG reveal animations. With this component, you can gradually reveal text in a visually appealing way, adding an element of suspense and elegance to your web projects.

intro

Features

  • Smooth and elegant text reveal animations.
  • Customizable animation duration, delay, and easing options.
  • Control over the reveal direction (left to right, right to left, top to bottom, or bottom to top).
  • Support for various text styles, including font size, color, and weight.
  • Easy integration with React projects and minimal setup required.

Installation

  • First, make sure you have Node.js and npm installed on your machine.
  • Clone this repository to your local machine or install it as a dependency in your existing React project using npm or yarn.

Clone Repository (if starting a new project)

git clone https://github.com/TommyRiquet/react-svg-reveal.git
cd react-svg-reveal

Install as Dependency (if using in an existing project)

npm install react-svg-reveal --save
# or
yarn add react-svg-reveal

Usage

  • Import the SVGReveal component in your React application.
import React from 'react';
import SVGReveal from 'react-svg-reveal';
  • Use the SVGReveal component in your code and provide the text you want to reveal.

function App() {
  return (
    <div>
      	<SVGReveal
			width={750},
			height={600},
			strokeWidth={2},
			viewBox='0 0 800 100',
			path={['M0 100V0l50 50 50-50v100L75 75l-25 25-25-25z']}
		/>
    </div>
  );
}
  • Customize the reveal animation by passing additional props.
function App() {
  return (
    <div>
      	<SVGReveal
			width={750},
			height={600},
			strokeWidth={2},
			viewBox='0 0 800 100',
			path={['M0 100V0l50 50 50-50v100L75 75l-25 25-25-25z']}
			backgroundColor='black'
			stroke='white'
			strokeWidth={2}
			strokeLineCap='square'
		/>
    </div>
  );
}

Props

The following props are available for customizing the SVGReveal component: |Prop|Type|Default|Description| |:---:|:---:|:---:|:---:| |path|Array of strings |(required)|svg path representing the text to be revealed.| |viewBox|string|(required)|svg viewBox representing the size of the text to be revealed.| |height|number|(required)|height of the svg element.| |width|number|(required)|width of the svg element.| |backgroundColor|string|transparent|background color of the svg element.| |stroke|string|black|stroke color of the svg element.| |strokeWidth|number|20|stroke width of the svg element.| |strokeLinecap|string|round|stroke

Examples

For more usage examples and ideas, check out the 'examples' folder in this repository.

Contributing

Contributions to this project are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.