Description
react-hint is a small tooltip component for React that also works with Preact and Inferno. It is built around simplicity and performance: you create the tooltip component with a factory function, passing in your React, Preact or Inferno library, and then mark elements with a data attribute to show a tooltip on them. A UMD build is available for use from a script tag. Options let you change the tooltip attribute, turn on automatic positioning near window edges, set a custom class name for styling, add show and hide delays, and choose which events (click, focus, hover) trigger it. You can also pass a function to render custom content inside the tooltip. It installs from npm and its source is on GitHub.…
Highlights
- Works with React, Preact and Inferno through one factory function
- Top, left, right and bottom placement
- Optional auto-positioning near window borders
- Configurable show/hide delay and trigger events
- Custom content rendering and custom class names
Ratings & Reviews
No ratings yet
Be the first to rate react-hint.
People also visit
react-bootstrap-range-slider
A range slider component with tooltips for React Bootstrap
react-hint FAQ
What is react-hint?
A lightweight tooltip component for React that also runs with Preact and Inferno.
How do I install it?
Run npm i -S react-hint, then create the component with ReactHintFactory(React). There is also a UMD build exposed as window.ReactHintFactory.
Can I control when the tooltip appears?
Yes. The events option enables click, focus and hover triggers, and the delay option sets a show and hide delay in milliseconds.
Can I show custom content?
Yes. Pass an onRenderContent function that returns a React node to render your own tooltip content.
Can I style it?
Override the default react-hint class with the className property, or change the tooltip attribute from data-rh to your own.
What are the best react-hint alternatives?
Popular alternatives to react-hint include react-tooltip, react-tooltip and react-floater. See all react-hint alternatives

















