vulture-modal-react
v0.0.2
Published
Vulture-modal is a minimalist and easy-to-use modal plugin
Downloads
4
Maintainers
Readme
Vulture-modal
Vulture-modal is a minimalist and easy-to-use modal plugin
Demo
It is still under development.
Features
- Multiple Modals
- Customizable (write your custom html in content)
Installation
- Run the below command to add Vulture-modal to your exisitng or new project.
npm i vulture-modal-react
or
yarn add vulture-modal-react
- Import Vulture-modal into your module to start using it.
import { VultureModal } from 'vulture-modal-react'
import 'vulture-modal-react/dist/style.css'
If you are not using any framework, you can use our vulture-modal library.
Documentation
You can use vulture modal with parameters like this.
<VultureModal />
or you can totaly customizable vulture modal
<VultureModal>
<div>customizable Modal</div>
</VultureModal>
API
| Option Key | type | Usage | Defaults | | ----------------- | ------------------------- | --------------------------------------------------------- | -------------------- | | show | boolean | Shows or hides the modal | false | | position | "center", "left", "right" | To show the modal on center or left or right | "center" | | headerText | string | Text to be displayed on the modal | "🎉 Vulture Modal" | | content | string | HTML Element | Text or html element to be displayed in the content | "🦅 Vulture Content" | | footer | boolean | To show the confirm and cancel button under the modal | true | | confirmButtonText | string | Change your confirm button text (Only if footer is true) | "Confirm" | | cancelButtonText | string | Change your cancel button text (Only if footer is true) | "Cancel" | | onConfirm | Function | It works when the confirm button is pressed in the footer | | | onCancel | Function | It works when the cancel button is pressed in the footer | | | onClose | Function | It works when the close icon is pressed in the header | |
License
ISC © Selim Hamzaoğulları