# Tooltip

Adds tooltip functionality to elements.

## Syntax

```boxlang
<bx:tooltip 
    for="string"
    text="string"
    delay="numeric"
    position="string">
</bx:tooltip>
```

## Attributes

| Attribute  | Type      | Required | Description                                 | Default |
| ---------- | --------- | -------- | ------------------------------------------- | ------- |
| `for`      | `string`  | Yes      | ID of element to attach tooltip to          |         |
| `text`     | `string`  | Yes      | Tooltip text content                        |         |
| `delay`    | `numeric` | No       | Show delay in milliseconds                  | `500`   |
| `position` | `string`  | No       | Tooltip position (top, bottom, left, right) | `"top"` |

## Examples

```boxlang
<input type="text" id="username" name="username" />
<bx:tooltip for="username" text="Enter your username" position="right" />
```

## Usage Notes

* Requires an existing element with the specified ID
* Tooltip appears on hover and disappears on mouse leave


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://boxlang.ortusbooks.com/boxlang-framework/modularity/ui-compatibility/reference/components/tooltip.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
