# Tooltip

A short hint attached to a focusable control, built on the Radix Tooltip.

This is a function exported by `@mapcairn/map`, checked against version 0.2.0.

## Signature

```ts
import { Tooltip } from "@mapcairn/map";
 
function Tooltip(input: TooltipProps): JSX.Element;
```

## Description

A tooltip supplements an accessible name and never replaces one: the
trigger must already be named by its own text or `aria-label`, and the
tooltip is exposed as its description.

It opens on keyboard focus as well as hover, closes with Escape, and stays
open while the pointer is over the tooltip itself (WCAG 1.4.13). Touch
devices cannot hover, so when the device preferences report no fine
pointer the tooltip does not exist at all and only the trigger renders.

The bubble renders in a portal under `body`, outside any element a host
scoped a theme to, so it takes the colours, font and corner radii its trigger sees (see
`inheritTheme`). A host's scoped theme therefore reaches it with no
markup or option of its own. The colours are read once, when the bubble
opens: a theme or colour scheme change while it is open applies the next
time it opens.

## Parameters

- `{ content, children }`
- `input` (`TooltipProps`)

## Returns

`JSX.Element`

## See also

- [`TooltipProps`](https://docs.mapcairn.com/api/map/TooltipProps.md)

Source: [packages/map/src/ui/Tooltip/Tooltip.tsx:78](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/ui/Tooltip/Tooltip.tsx#L78)
