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

acid-ui

v0.0.9

Published

A react component and animation library that abstracts out the logic behind compound components without imposing a styling pattern on the developer. It's animation components and hooks are wrappers and helpers for animate.css CSS library.

Downloads

11

Readme

ACID UI

enter image description here

INTRO

ACID UI is a react component and animation library that abstracts out the logic behind compound and simple components without imposing a styling pattern on the developer. Its animation components and hooks are wrappers and helpers for animate.css CSS library, which is marked as a project dependency.

FEATURES

  1. Animated Renders: This is a component wrapper that is used to render a component in an animated manner when they come into view. A use case for this is if you want elements to only get rendered when their within view and you want them to have a dramatic, animated render-like fade-in or zoom-in.
  2. Animation hook: This is a hook that programmatically causes your elements to animate in certain ways. A use case for this is if you're trying to make a form input 'wobble' if a certain character is being entered.

INSTALLATION

With npm: npm install acid-ui

With yarn: yarn add acid-ui

EXPORTS

Here are the components exported from this library

  • Render

Here are the hooks exported from this library

  • useAnimator

COMPONENTS

1. Render

Below is how the Render component is used in its simplest form.

import { Render } from "acid-ui";

function App() {
	return (
		<Render>
			Lorem, ipsum dolor sit amet consectetur adipisicing elit. Facilis
			consequatur mollitia odit adipisci recusandae enim! Quam dignissimos
			soluta dolor perspiciatis. Cupiditate odio provident aliquid enim
			ducimus inventore! Non, itaque nostrum!
		</Render>
	);
}

HOOKS

1. useAnimator

Below is how the useAnimator hook is used.

import { useAnimator } from "acid-ui";
import { useRef } from "react";

function App() {
	const inputRef = useRef(null);
	const { shakeX } = useAnimator(inputRef);

	const handleSubmit = (e) => {
		e.preventDefault();
		shakeX(); // Shakes the input field when the form is submitted
	};

	return (
		<div>
			<form onSubmit={handleSubmit}>
				<div>
					<input type="text" ref={inputRef} />
				</div>
				<div>
					<button>Submit Form</button>
				</div>
			</form>
		</div>
	);
}

export default App;

API

NOTE: All the properties of this element are optional. They are all initialized with default values that work well and are described in the table below. Of course, you have the option of overwriting them as you please; but be careful. Animations can be pretty displeasing to the user and can cause bad UX. So make them as subtle as possible.

1. Render

| Properties | Default | Types | Description | | ----------------- | ---------- | ----------------------- | ---------------- | | type | "block" | "block"\|"inline" | This describes whether or not you want the renderer to appear as a block or inline level element. | | entranceDelay | 0 | 0\|2\|3\|4\|5 | This describes how many seconds you want the element's display on view to delay after rendering. | | entranceSpeed | "faster" | "normal"\|"slow"\|"slower"\|"fast"\|"faster" | This describes how fast you want the entrance animation to take place.| | animationRepeat | 0 | 0 \| 1 \| 2 \| 3 \| "infinite" | This refers to the number of times you want the entrance animation to repeat itself; Warning: This can greatly affect user experience negatively if misused. A good rule of thumb, always leave it in 0 unless absolutely necessary. | entranceType | "zoomIn" | "specialsJackInTheBox" \| "specialsRollIn" \| "backInDown" \| "backInLeft" \| "backInRight" \| "backInUp" \| "bounceIn" \| "bounceInDown" \| "bounceInLeft" \| "bounceInRight" \| "bounceInUp" \| "fadeIn" \| "fadeInDown" \| "fadeInDownBig" \| "fadeInLeft" \| "fadeInLeftBig" \| "fadeInRight" \| "fadeInRightBig" \| "fadeInUp" \| "fadeInUpBig" \| "fadeInTopLeft" \| "fadeInTopRight" \| "fadeInBottomLeft" \| "fadeInBottomRight" \| "flipInX" \| "flipInY" \| "lightSpeedInRight" \| "lightSpeedInLeft" \| "rotateIn" \| "rotateInDownLeft" \| "rotateInDownRight" \| "rotateInUpLeft" \| "rotateInUpRight" \| "zoomIn" \| "zoomInUp" \| "zoomInDown" \| "zoomInLeft" \| "zoomInRight" \| "slideInDown" \| "slideInLeft" \| "slideInRight" \| "slideInUp" | This describes the type of animation you want to see during the entrance. Go the animate.style to see the above listed animations previews. |

2. useAnimator

| Access | Variety | | ------- | ------------------------------------------------------------------------------------------------------- | | Destructured | bounceIn, flash, pulse, rubberBand, shakeX, shakeY, headShake, swing, tada, wobble, jello, heartBeat, |