Skip to content

Commit

Permalink
More tooltip notes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanflorence committed Apr 30, 2019
1 parent 9b0e970 commit 99c687b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/tooltip/examples/basic.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ export function Example() {
<span aria-hidden>⚙️</span>
</button>
</Tooltip>
<Tooltip label="Your files are safe with us">
<button style={{ fontSize: 25 }}>
<span aria-hidden>💾</span> Save
</button>
</Tooltip>

<div style={{ float: "right" }}>
<Tooltip label="Notifications" ariaLabel="3 Notifications">
Expand Down
8 changes: 6 additions & 2 deletions www/src/pages/tooltip.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ import Helmet from "react-helmet"

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

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.
A couple notes on using tooltips:

Please see the [Tooltip Guidelines](https://www.nngroup.com/articles/tooltip-guidelines/) by the Nielson Norman group before using these, we've taken care of some of it, but some of it is up to you too :)
- 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](/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.

```.jsx
<div>
Expand Down

0 comments on commit 99c687b

Please sign in to comment.