Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@reach/tooltip

Package Overview
Dependencies
Maintainers
4
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reach/tooltip

Accessible tooltips

  • 0.18.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
61K
decreased by-27.86%
Maintainers
4
Weekly downloads
 
Created
Source

@reach/tooltip

Stable release MIT license

Docs | Source | WAI-ARIA

When the user's mouse or focus rests on an element, a non-interactive popup is displayed near it.

A couple notes on using tooltips:

  • Do not use tooltips for information vital to task completion. The elements they are attached to should usually make sense on their own, but a tooltip can help provide a little bit more information--especially for new users of your app.
  • Keep the content minimal, they are not intended to hide critical content.
  • If you want interactive content, you can use a Dialog.

Touch Events: Touch events are currently not supported. There's not a lot of research or examples of these types of tooltips on mobile. We have some ideas but need to validate them first before implementing. Please adjust your interfaces on mobile to account for this.

import { Tooltip, useTooltip, TooltipPopup } from "@reach/tooltip";
import { VisuallyHidden } from "@reach/visually-hidden";
import "@reach/tooltip/styles.css";

function Example() {
	return (
		<Tooltip label="Save">
			<button>
				<VisuallyHidden>Save</VisuallyHidden>
				<span aria-hidden>💾</span>
			</button>
		</Tooltip>
	);
}

FAQs

Package last updated on 13 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc