Offcanvas
Wrapper for the Bootstrap offcanvas component.
Example Usage
import React from "react";
import {Offcanvas} from "bs5-react-elements";
function ExampleUsage() {
return <>
<button data-bs-toggle="offcanvas" data-bs-target="#example-usage">
Launch
</button>
<Offcanvas
className="offcanvas offcanvas-start"
id="example-usage"
tabIndex="-1"
aria-hidden="true"
>
<div className="offcanvas-body">
Lorem ipsum.
</div>
</Offcanvas>
</>;
}
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.offcanvas event | func | 0.2.0 | |
onShow | Handler for the show.bs.offcanvas event | func | 0.2.0 | |
onHidden | Handler for the hidden.bs.offcanvas event | func | 0.2.0 | |
onHide | Handler for the hide.bs.offcanvas event | func | 0.2.0 | |
component | React ref that will be assigned the component instance | React ref | 0.2.0 | |
config | Component configuration | object | 0.2.0 | |
children | Offcanvas contents | node | 0.2.0 |