@mdbootstrap/react-modal-size
v1.0.0
Published
Responsive React popup window sizing with Bootstrap 5. Modal width, modal height, fullscreen modal, large modal with lg & xl modal classes and more.
Downloads
2
Maintainers
Readme
MDB React 5
Responsive React popup window sizing with Bootstrap 5. Modal width, modal height, fullscreen modal, large modal with lg & xl modal classes and more.
Check out React Modal Size Documentation for detailed instructions & even more examples.
Modal Size
import React, { useState } from 'react';
import {
MDBBtn,
MDBModal,
MDBModalDialog,
MDBModalContent,
MDBModalHeader,
MDBModalTitle,
MDBModalBody
} from 'mdb-react-ui-kit';
export default function App() {
const [optSmModal, setOptSmModal] = useState(false);
const toggleShow = () => setOptSmModal(!optSmModal);
return (
<>
<MDBBtn onClick={toggleShow}>Small modal</MDBBtn>
<MDBModal show={optSmModal} tabIndex='-1' setShow={setOptSmModal}>
<MDBModalDialog size='sm'>
<MDBModalContent>
<MDBModalHeader>
<MDBModalTitle>Small modal</MDBModalTitle>
<MDBBtn className='btn-close' color='none' onClick={toggleShow}></MDBBtn>
</MDBModalHeader>
<MDBModalBody>...</MDBModalBody>
</MDBModalContent>
</MDBModalDialog>
</MDBModal>
</>
);
}
How to use?
Download MDB 5 - FREE REACT UI KIT
Choose your favourite customized component and click on the image
Copy & paste the code into your MDB project
▶️ Subscribe to YouTube channel for web development tutorials & resources
You can find other examples here.