simple-animate-presence
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Simple Animate Presence

A simple animation library to make your components a little bit more smooth.

Installation

npm install simple-animate-presence

or

yarn add simple-animate-presence

Usage

import React from 'react';
import ReactDOM from 'react-dom';
import { AnimatePresence } from 'simple-animate-presence';

const App = () => {
  const [isVisible, setIsVisible] = React.useState(false);

  return (
    <div>
      <button onClick={() => setIsVisible(!isVisible)}>Toggle Visibility</button>
      <AnimatePresence isOpened={isVisible}>
        <div style={{ background: 'red', width: '100px', height: '100px' }}>Animated Component</div>
      </AnimatePresence>
    </div>
  );
};

ReactDOM.render(<App />, document.getElementById('root'));

Contributing

Contributions are welcome! Please open an issue or send a pull request to suggest improvements or fixes.

License

This project is licensed under the MIT License.

Author

  • JoaoVitorOli

Readme

Keywords

Package Sidebar

Install

npm i simple-animate-presence

Weekly Downloads

4

Version

0.0.2

License

MIT

Unpacked Size

4.31 kB

Total Files

5

Last publish

Collaborators

  • joaovitoroli