@astrum-ui/modal
v1.1.0
Published
Introducing Astrum-UI/Modal: A versatile React component for creating sleek and customizable modal overlays effortlessly.
Downloads
5
Maintainers
Readme
@astrum-ui/modal
Introducing Astrum-UI/Modal: A versatile React component for creating sleek and customizable modal overlays effortlessly.
Installation
npm install --save @astrum-ui/modal
or access the complete suite of components
npm install --save @astrum-ui/core
Usage
import Modal from @astrum-ui/modal
import { useState } from 'react'
export default function HelloModal() {
const [show, setShow] = useState(false)
return (
<>
<Modal show={show} setShow={setShow} >
<h2>Hello world heading</h2>
<div>Hello world content</div>
</Modal>
<button type="button" onClick={() => setShow(true)} >
Show Modal
</button>
</>
)
}
Note :
h2
must be the direct children ofModal
to be the heading of modal
More examples
Props
Here's a list of all the props available to customize this modal according to your need
* for required
- for any value of specified type