Modal

Wrapper for the Bootstrap modal component.

Example Usage

import React from "react";
import {Modal} from "bs5-react-elements";

function ExampleUsage() {
  return <>
    <button data-bs-toggle="modal" data-bs-target="#example-usage">
      Launch
    </button>
    <Modal
      className="modal fade"
      id="example-usage"
      tabIndex="-1"
      aria-hidden="true"
    >
      <div className="modal-dialog">
        <div className="modal-content">
          Lorem ipsum dolor.
        </div>
      </div>
    </Modal>
  </>;
}

Demos

There are no demos available for this element. Submit an issue or pull request on GitHub to add one.

Props

Name Description Type Default Value Since
onShown Handler for the shown.bs.modal event func 0.1.0
onShow Handler for the show.bs.modal event func 0.1.0
onHidden Handler for the hidden.bs.modal event func 0.1.0
onHide Handler for the hide.bs.modal event func 0.1.0
onHidePrevented Handler for the hidePrevented.bs.modal event func 0.1.0
component React ref that will be assigned the component instance React ref 0.1.0
config Component configuration object 0.1.0
children Modal contents node 0.1.0