TooltipPro
A small label for one control: shows after a short rest and at once on keyboard focus, neighbours follow instantly, a shortcut inside, a rich form with a title.
oxyn add tooltipThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- A small label for one control: shows after a short rest and at once on keyboard focus, neighbours follow instantly, a shortcut inside, a rich form with a title.
When not to use
- Actions and choices behind any trigger: use Dropdown Menu instead.
- Eight variants and five sizes, with a shimmering loading state, a progress fill, press-and-hold for destructive actions and a shortcut chip: use Button instead.
- An app sidebar: use Sidebar instead.
Installation
Tooltip is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add tooltipUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Shortcut
Label with its shortcut.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Bottom
Below the control.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Rich
A title line and text.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Hover
Real hover: rest the pointer on it.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
Tooltip
| Prop | Type | Default | Description |
|---|---|---|---|
contentrequired | String | — | Text (becomes the trigger's description). |
title | Option<String> | Default::default() | Rich: a title line above the text. |
shortcut | Option<String> | Default::default() | Shortcut shown inside. |
side | String | "top" | `top` · `bottom` · `left` · `right`. |
align | String | "center" | `start` · `center` · `end`. |
offset | f32 | 6.0 | Gap px (6). |
delay | u32 | 500 | Hover delay ms (500). |
disabled | bool | Default::default() | Never shows. |
open | Option<bool> | Default::default() | Force open (review sheets) / controlled. |
on_open_change | EventHandler<bool> | — | Open state changed. |
childrenrequired | Element | — | The trigger. |
TooltipProvider
| Prop | Type | Default | Description |
|---|---|---|---|
childrenrequired | Element | — | — |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Focus shows it at once |
| Esc | Hide it |
Accessibility
- The text becomes the trigger's description (aria-describedby).
- Wrap the app in TooltipProvider so neighbouring tooltips open without a second delay.
Responsive behaviour
- side picks where it opens; it never takes focus.
Notes for AI
- Import
Tooltip,TooltipProviderfromoxyn_dioxusand includePRIMITIVES_CSSplus the token stylesheet once. - A GPUI version exists:
TooltipElinoxyn_gpui. - Props to set first:
content,children,children. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.