doodle-ui

Tooltip

Radix Tooltip with a small sketch bubble. Wrap the app in TooltipProvider once (the docs site already does).

<Tooltip content="A small sketch bubble" roughness={1.5}>
  <Button variant="outline">Hover me</Button>
</Tooltip>

Usage

import { Tooltip, TooltipProvider, Button } from "doodleui-react";

<TooltipProvider>
  <Tooltip content="A small sketch bubble">
    <Button variant="outline">Hover me</Button>
  </Tooltip>
</TooltipProvider>

The trigger must accept a ref. Native elements and doodle-ui buttons both work. If you pass a custom component, wrap it with forwardRef.

Props

PropTypeDefaultNotes
contentReactNoderequiredBubble body.
side"top" | "right" | "bottom" | "left""top"Radix placement.
delayDurationnumber200Hover delay in milliseconds.
roughnessnumber1.5How wobbly the stroke is. 0 is almost geometric. 3+ is messy.
seednumberprovider / randomLocks the sketch. Omit to follow SketchSeedProvider (Shuffle) or a mount-time random seed.
sketchColorstring#1f1d1aStroke color. Also tints primary/accent fills where relevant.
classNamestringundefinedPassed through to the root element.
styleCSSPropertiesundefinedPassed through to the root element.