qat

Tooltip

Tooltip. It is copied into your app’s ui/ by qatjs add tooltip: the code is yours to edit.

Example

Copy order number
Example.qx18 linesOpen in the playground
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

shell1 line
npx qatjs add tooltip

Tooltip

As a custom element: <ui-tooltip>.

Tooltip: props
PropTypeAttribute
textstringyes
delaynumberyes

Keys

KeyDoes
focusshows it
Eschides it