components / 12

marked tooltip

a hint should feel like someone leaned over and penciled a note beside the thing you were already looking at.

shadcnnpx shadcn@latest add berkantay/cheez/marked-tooltip
live

playground

hover or focus
size
side
align
character
frame
arrow
ink
behavior
<MarkedTooltip
  size="medium"
  character="rushed"
  frameMark="rounded-box"
  arrowMark="pointer"
>
  <MarkedTooltipTrigger>hover me</MarkedTooltipTrigger>
  <MarkedTooltipContent side="top" align="center">
    a quick margin note
  </MarkedTooltipContent>
</MarkedTooltip>
placement

four directions

collision aware
behavior

states

hover, focus, cursor, disabled
short hint
shortcut
multiline
cursor tracking
without arrow
disabled
composition

editing toolbar

first waits, siblings follow instantly

pause on the first tool, then move across the set.

reference

api

provider, root, trigger, content
partproptypedefaultpurpose
Providerdelaynumber450shared opening delay
ProvidercloseDelaynumber40shared closing delay
Providertimeoutnumber320instant-follow window
Rootopenbooleancontrolled visibility
RootdefaultOpenbooleanfalseuncontrolled initial state
RootonOpenChangefunctionvisibility callback with reason
RoottrackCursorAxis"none" | "x" | "y" | "both""none"follow pointer movement
RootdisableHoverablePopupbooleanfalseclose when pointer leaves trigger
Rootdisabledbooleanfalsedisable tooltip behavior
RootframeMarkCheezType"rounded-box"note boundary
RootarrowMarkCheezType"pointer"directional pen arrow
RootframeColorstring"#35d9ff"frame ink
RootarrowColorstringframe colorarrow ink
RoottriggerMarkCheezType"short-underline"hover and focus mark
RoottriggerColorstring"#b7ff3c"trigger ink
Rootcharacter"calm" | "rushed" | "chaotic""rushed"drawing personality
Rootsize"small" | "medium" | "large""medium"note scale
Triggerdelaynumberprovider valuelocal opening delay
TriggercloseDelaynumberprovider valuelocal closing delay
TriggercloseOnClickbooleantruedismiss after press
TriggernativeDisabledbooleanfalsedisable button and tooltip
Contentside"top" | "right" | "bottom" | "left""top"preferred placement
Contentalign"start" | "center" | "end""center"cross-axis alignment
ContentsideOffsetnumber14distance from trigger
ContentshowArrowbooleantruedirectional pen arrow
ContentkeepMountedbooleanfalsepreserve portal contents

behavior notes

  • hover and keyboard focus both reveal the same hint
  • Escape dismisses the active tooltip
  • placement flips or shifts when it would leave the viewport
  • provider timing makes adjacent toolbar hints feel immediate
  • tooltips supplement accessible labels; they never replace them
  • interactive content belongs in a popover, not a tooltip