React highlight menu demos

Open an accordion and highlight text anywhere on the page to reveal the context menu.

The target property supports both css-selectors and refs.

const TargetExample = () => {
  /* Using a css selector */
  return (
    <HighlightMenu
      styles={{/* ...styles */}}
      target=".target-example"
      menu={()=><>Buttons go here</>}
    />
    <div ref={menuRef}>
      Selecting this text will show the menu!
    </div>
  );
};