Tooltip
Tooltip
Reveal supplementary information on hover or focus without navigating away.
$ npx verticallyworks add tooltipWhich direction should a tooltip expand when the baseline is vertical?
DecisionPlacement must not obscure adjacent vertical text or interrupt the reading flow. Left placement follows reading direction; below placement follows screen geometry.
Placement comparison
Hover a verse reference. Tooltip is vertical · it matches the reading axis it annotates.
Source
The exact file npx verticallyworks add tooltip copies into your project · yours to edit. Styling comes entirely from the design tokens.
Guidance
- Default to left placement · tooltip appears in the direction reader came from
- Keep tooltip width ≤ 240px
- Dismiss on Escape and pointer leave with 200ms delay
- Place tooltips below vertical text triggers · they interrupt the column below
- Use tooltips for interactive content
- Animate tooltips on the reading axis
Accessibility
role='tooltip'. aria-describedby on trigger. Not used for required information. Keyboard accessible via focus.
When a vertical column is at the leftmost edge of the viewport, where does a left-placed tooltip go? Smart collision detection for vertical baselines is unsolved.