Tooltip
Tooltip. It is copied into your app’s ui/ by qatjs add tooltip: the code is yours to edit.
Example
import Button from './ui/button/button.qx'
import Tooltip from './ui/tooltip/tooltip.qx'
export default function Example() {
return (
<Tooltip text="Copy order number">
<Button
label="Copy order number"
icon={
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true">
<rect x="7" y="7" width="10" height="10" rx="2"></rect>
<path d="M13 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2"></path>
</svg>
}
/>
</Tooltip>
)
}Add it
npx qatjs add tooltipTooltip
As a custom element: <ui-tooltip>.
| Prop | Type | Attribute |
|---|---|---|
text | string | yes |
delay | number | yes |
Keys
| Key | Does |
|---|---|
| focus | shows it |
| Esc | hides it |