Knit UI
GitHub

Playground

Loading playground…

false
false
false
true
false
Playground
<Tooltip
  label="Tooltip label"
  position="top"
  offset={5}
  withArrow={false}
  arrowSize={4}
  arrowOffset={5}
  arrowRadius={0}
  multiline={false}
  disabled={false}
  withinPortal
  keepMounted={false}
  zIndex={300}
/>

Examples

Transitions

Configurable enter/exit animation via transitionProps. Pick a preset, then toggle the label to watch it animate (shared Transition engine — same presets on web and native).

Loading example…

TransitionsSourceStorybook

Positions

All twelve supported placements displayed at once for a quick visual overview.

Loading example…

PositionsSourceStorybook

With Arrow

Tooltip with an arrow pointing at its target; arrow size is configurable.

Loading example…

With ArrowSourceStorybook

Theme

Tooltip label colors follow the active Tamagui theme.

Loading example…

ThemeSourceStorybook

Disabled

Disabled tooltip — even with opened forced it never shows the label.

Loading example…

DisabledSourceStorybook

Multiline

Multiline label — wraps long content instead of truncating at 320 px.

Loading example…

MultilineSourceStorybook

Delays

Open and close delays add a intentional pause before the label appears or disappears.

Loading example…

DelaysSourceStorybook

Controlled

Controlled open state — the parent drives visibility via React state.

Loading example…

ControlledSourceStorybook

Events

Touch and focus events can trigger the tooltip in addition to (or instead of) hover.

Loading example…

EventsSourceStorybook

Shadows

Optional elevation via the shadow prop — the shared ladder from xs to xl.

Loading example…

ShadowsSourceStorybook

Styles

Per-slot styles targets individual parts — here the dropdown and label.

Loading example…

StylesSourceStorybook

Props

PropTypeDefaultDescription
children requiredReactElement<unknown, string | JSXElementConstructor<any>>Single target element that accepts a ref.
label requiredReactNodeTooltip labelFloating label content shown when the tooltip opens.
animationMotionPresetName | undefinedMotion preset for the label — the unified `animation` vocabulary shared with Modal/Dialog/Drawer (e.g. `"fade"`, `"pop"`, `"scale"`). Sugar over `transitionProps.transition`, which wins if both are set.
arrowOffsetnumber | undefined5Arrow distance from the start/end edge when `arrowPosition="side"`.
arrowPositionArrowPosition | undefined'side'Arrow alignment: centered, or pinned toward an aligned placement.
arrowRadiusnumber | undefined0Corner radius of the arrow's outward corner in px.
arrowSizenumber | undefined4Arrow square size in px (before the internal 2× scale).
closeDelaynumber | undefined0Delay in ms before the tooltip closes.
defaultOpenedboolean | undefinedUncontrolled initial opened state.
disabled systemboolean | undefinedfalsePrevent the tooltip from ever opening.
eventsPartial<TooltipEvents> | undefined{ hover: true, focus: false, touch: false }Which interactions open the tooltip.
inlineboolean | undefinedfalsePosition correctly around an inline/wrapping target (floating-ui `inline` middleware). Works on web and native.
keepMountedboolean | undefinedfalseKeep the label node mounted while closed (hidden via display:none).
multilineboolean | undefinedfalseAllow the label to wrap across multiple lines.
offsetFloatingOffset | undefined5Main-axis gap in px between the target and the label.
onPositionChange((position: TooltipPosition) => void) | undefinedCalled with the RESOLVED placement whenever it changes (e.g. on flip/shift).
openDelaynumber | undefinedDelay in ms before the tooltip opens.
openedboolean | undefinedControlled opened state.
positionPlacement | undefined
top · top-start · top-end · bottom · bottom-start · bottom-end · left · left-start · left-end · right · right-start · right-end
'top'Preferred placement relative to the target element.
radius systemstring | number | undefined
refPropstring | undefined'ref'Prop used to pass the ref into the target child.
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
unset · xs · sm · md · lg · xl
Elevation — drop shadow from the shared ladder.
styles systemSlotStyles<TooltipStyles> | undefinedPer-slot style sugar — props spread onto the matching styled part.
theme systemThemeName | null | undefined
unset · blue · red · green · yellow · pink · gray
Accent theme used for the tooltip label.
transitionPropsOverlayTransitionConfig | undefined{ transition: 'fade', duration: 150, timingFunction: 'ease-in-out' }Enter/exit animation: { transition, duration, exitDuration, timingFunction }. Defaults to a 150ms fade.
withArrowboolean | undefinedfalseShow a small arrow pointing at the target.
withinPortalboolean | undefinedtrueRender the label in a portal (recommended).
zIndexnumber | undefined300Label `z-index`.

Style slots

Every part of Tooltip can be styled through the styles prop. Explicit props on the component always win over slot styles.

SlotUsage
arrowstyles={{ arrow: { … } }}
dropdownstyles={{ dropdown: { … } }}
labelstyles={{ label: { … } }}
textstyles={{ text: { … } }}
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<TamaguiElement> | undefined

Plus 495 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.