A simple React modal component with an explosion effect
npm i reactplosive-modal
import ReactplosiveModal from "reactplosive-modal";
const YourComponent = () => {
const [isModalVisible, setIsModalVisible] = useState(false);
return (
<ReactplosiveModal
title={<h4>Title</h4>}
isVisible={isModalVisible}
onClose={() => setIsModalVisible(false)}
>
<p> Lorem ipsum dolor sit amet.</p>
<button>I do nothing.</button>
</ReactplosiveModal>
);
};
{
title?: ReactNode,
children: ReactNode,
isVisible: boolean,
width?: string, // default 500px
onClose: (visibility: boolean) => void,
outsideClickEnabled?: boolean, // default true
};
Licensed under MIT