Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@dorbus/react-animated-modal
Advanced tools
Readme
This component library is inspired from Jesse Couch's Animated Modal codepen.
yarn add @dorbus/react-animated-modal
npm install @dorbus/react-animated-modal
To use Animated Modal in your application, first import AnimatedModal
, AnimatedModalObject
, ModalAnimation
and AnimatedModalFrame
.
Create a Ref object using useRef
and pass it to the AnimatedModal
Component.
const ref = useRef<AnimatedModalObject>(null);
<AnimatedModal ref={ref} />
// Open modal
ref.current?.OpenModal()
// Open modal with animation
ref.current?.OpenModal(ModalAnimation.Reveal)
ref.current?.CloseModal()
For now, the library supports seven different animations:
ModalAnimation.Unfold
ModalAnimation.Reveal
ModalAnimation.Uncover
ModalAnimation.Flash
ModalAnimation.Slide
ModalAnimation.BlowUp
ModalAnimation.Sketch
Use animation prop to enable different animations, by default the animation is of type Unfold.
<AnimatedModal
ref={ref}
animation={ModalAnimation.Unfold}/>
Component | Prop | Type | Description | Default |
---|---|---|---|---|
AnimatedModal | startOpen | boolean | State open state of the modal in start | false |
animation | ModalAnimation | Different modal animations | ModalAnimation.Unfold | |
closeOnBackgroundClick | boolean | Whether the modal should close on background click | true | |
backgroundStyle | CSS | Pass custom background styles | - | |
modalStyle | CSS | Pass custom modal styles | - |
Code and documentation Copyright (c) ISC © 2022 Dorbus.
FAQs
Animated modal dialogs for React, easy to use pre-built components for smooth and visually appealing user interactions.
The npm package @dorbus/react-animated-modal receives a total of 5 weekly downloads. As such, @dorbus/react-animated-modal popularity was classified as not popular.
We found that @dorbus/react-animated-modal demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.