question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

One tooltip, many anchors

See original GitHub issue

One of the big advantages of react-tooltip <= v4 was you could have a single tooltip somewhere in the root of your application and just scatter the data-tip attribute around your application and it would “just work”. It looks like having a specific anchorId -> id relationship in v5 enforces a 1:1 relationship. Unless undocumented, can we support or provide non-verbose ways to achieve this? Thanks.

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gabrieljablonskicommented, Dec 10, 2022

@jamieshepherd

I believe this example should help reduce the worries about verbosity. The only relevant thing not shown below is that the component must be inside the provider.

function WithProviderMinimal() {
  return (
    <section style={{ marginTop: '100px' }}>
      <p>
        <TooltipWrapper place="bottom" content="Shared Global Tooltip">
          <button>Minimal 1</button>
        </TooltipWrapper>
        <TooltipWrapper place="right" content="Shared Global Tooltip">
          <button>Minimal 2</button>
        </TooltipWrapper>
      </p>
      <Tooltip />
    </section>
  )
}

Just missing some more testing, this should be live soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tooltip does not display when anchor is out of normal flow
On my site, I use DOM nodes of class="trigger" as anchors for tooltips. When the mouve hovers these anchors, a tooltip displays.
Read more >
Anchor Elements - Tooltip - Kendo UI for Angular - Telerik
Define which anchor elements will display a Kendo UI Tooltip for Angular. ... To specify multiple types of elements as anchors, separate them...
Read more >
Tooltips - Bootstrap
Documentation and examples for adding custom Bootstrap tooltips with CSS and JavaScript using CSS3 for animations and data-attributes for local title ...
Read more >
Tooltip | Common Settings - AnyChart Documentation
Single tooltip is the default mode. In this mode tooltip displays information only for a single point that is hovered over. // create...
Read more >
dynamically determine best tooltip anchor · Issue #580 - GitHub
In a previous version we were using (0.31.0, specifically), the tooltip would adjust by anchoring itself on the opposite side of the cursor...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found