Popover

Wrapper for the Bootstrap popover component.

Example Usage

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

function ExampleUsage() {
  return <Popover
    title="Lorem ipsum"
    data-bs-content="Lorem ipsum dolor."
    data-bs-toggle="popover"
  >
    Lorem ipsum
  </Popover>
}

Important! If you choose to pass a user defined component to the as prop, it must support ref forwarding.

Demos

The demos below show this element in action. You can view the source code of each demo to see how they work.

Props

Name Description Type Default Value Since
as The element type of the popover elementType 'span' 0.2.0
onShown Handler for the shown.bs.popover event func 0.2.0
onShow Handler for the show.bs.popover event func 0.2.0
onHidden Handler for the hidden.bs.popover event func 0.2.0
onHide Handler for the hide.bs.popover event func 0.2.0
onInserted Handler for the inserted.bs.popover 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 Popover contents node 0.2.0
renderTitle Render popover title as a react component func 2.0.0
renderContent Render popover content as a react component func 2.0.0