Tooltip
A short note for one focusable element; entry delay and four-side placement.
Real scenarios
The component as it is used in a product — not a specimen grid.
Icon-only actions on the invoice row
Hover a button and after the default 350 ms the tip settles below the row, clear of the row above; Tab brings it up at once and Escape closes it. The tip describes (aria-describedby) while the name still comes from aria-label — an icon-only button keeps both.
Fee terms and a clipped name in the checkout summary
The default side lands the tip above its trigger, away from the amounts underneath. The info button answers “what is this fee?”, and the buyer’s pill — clipped by the narrow column — reads in full through its own tip; it is focusable with tabindex, so the keyboard sees it too.
-
1% of each transaction, capped at 20,000 tomans.Payment gateway fee 18,400 Toman
-
9% on the service fee only — never on the goods.Value-added tax 1,656 Toman
-
Buyer
Amara Okafor — order #981, Esfand 1403
The locked delete says why
A truly disabled button never sees the pointer, so its reason stays hidden. The sound pattern is a live button carrying aria-disabled: the tip settles on its inline-end side with a shorter 150 ms delay, and the click answers with a warning toast instead of pretending nothing happened.
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| text | string | — | The tooltip text (role=tooltip). |
| side | string | top | Placement: top · bottom · start · end. |
| delay | int | 350 | Entry delay in milliseconds. |
Snippet
<x-nx::tooltip text="کپی لینک دعوت">
<x-nx::button icon="copy" icon-only aria-label="کپی لینک دعوت" />
</x-nx::tooltip>