Tooltip
Names an icon-only button and its shortcut. bg/inverse, radius 8, Label/XS. 450ms before the first one, instant for its neighbours.
Delay and neighbours
Wrap the app in TooltipProvider once. The first tooltip waits 450ms and grows from its button (125ms, scale 0.97 and opacity). While one is open, moving to the next button opens its tooltip with no delay and no animation, so a toolbar feels fast after the first hover.
Usage
import { Tooltip, TooltipProvider } from "@kuori/ui/tooltip";<Tooltip label="Archive" shortcut="E"> <button type="button">Archive</button></Tooltip>Tooltip
PropTypeDescription
labelRequiredstringWhat the button does, in sentence case
shortcutstringThe keyboard shortcut, at 60%
side'top''bottom''left''right'Where it opens. The rail uses rightDefault:
topchildrenRequiredReactElementThe element it describes. It must take a ref and spread its props
classNamestringAdditional CSS classes
TooltipProvider
PropTypeDescription
childrenRequiredReactNodeEverything whose tooltips share the delay