1.0.9 • Published 1 year ago

@edmaralencar/modal v1.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

@edmaralencar/modal

https://user-images.githubusercontent.com/76753377/232330339-03a9e9f3-48a3-43ca-ab0a-109da3d1c89c.mov

Github: https://github.com/edmaaralencar/react-modal

Installation

  • Use yarn add @edmaralencar/modal or npm install @edmaralencar/modal

Description

This library is made with Framer Motion and Radix UI (React Dialog) and it simplifies the building of a modal with animations.

Usage

To use, you have to followe the instructions down below:

OBS: The Modal component can only have 1 direct children, which its gonna receive all the animations.

  • Import the Modal component;
  • There is also ModalTitle, ModalDescription and ModalClose, which all of them are the same as the Radix UI ones.
  • Pass the props: - children: This is the modal content itself. - open: current state of modal (if true, the modal is open, else is closed). - onOpenChange: function that changes the current state of modal. - variant (optional): it comes with a default animation, but you can change it using this props - it has to follow the current structure: - backgroundOpacity (optional) (values can be 0 to 1): changes the background opacity.
  • Build your own modal.

Example

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago