BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/fluid-functionalism/tooltip

Tooltip

fluid-functionalism/tooltip
FreeComponent

Floating tooltip with spring-based animations, configurable placement, and rich content support.

Install it

npx shadcn@latest add https://fluidfunctionalism.com/r/tooltip.json

Source

registry/radix/tooltip.tsxfluidfunctionalism.com/r/tooltip.json · first 6 KB
1"use client";
2
3import {
4 createContext,
5 useContext,
6 useEffect,
7 useState,
8 type ReactNode,
9} from "react";
10import * as TooltipPrimitive from "@radix-ui/react-tooltip";
11import { motion } from "framer-motion";
12import { cn } from "@/lib/utils";
13import { spring, exitFallbackMs } from "@/lib/springs";
14import { fontWeights } from "@/lib/font-weight";
15import { useShape } from "@/lib/shape-context";
16
17// ---------------------------------------------------------------------------
18// Portal container context
19// ---------------------------------------------------------------------------
20
21const TooltipPortalContainerContext = createContext<HTMLElement | null>(null);
22
23function TooltipPortalContainer({
24 value,
25 children,
26}: {
27 value: HTMLElement | null;
28 children: ReactNode;
29}) {
30 return (
31 <TooltipPortalContainerContext.Provider value={value}>
32 {children}
33 </TooltipPortalContainerContext.Provider>
34 );
35}
36
37// ---------------------------------------------------------------------------
38// Provider
39// ---------------------------------------------------------------------------
40
41const DEFAULT_DELAY = 200;
42
43// Tracks whether an app-level <TooltipProvider> is above us. Each Tooltip
44// only wraps itself in a local primitive Provider when there isn't one —
45// a per-instance Provider would defeat cross-tooltip skip-delay grouping
46// (moving between adjacent tooltips would re-wait the full delay). Radix's
47// Root throws without a Provider, so the local fallback can't be dropped.
48const TooltipGroupContext = createContext(false);
49
50interface TooltipProviderProps {
51 children: ReactNode;
52 /** Hover delay before tooltips open, in ms. Defaults to 200. */
53 delayDuration?: number;
54 /** After a tooltip closes, adjacent tooltips opened within this window
55 * skip the hover delay, in ms. Defaults to 300. */
56 skipDelayDuration?: number;
57}
58
59/** Groups descendant Tooltips so that once one opens, moving to an adjacent
60 * trigger shows its tooltip instantly instead of re-waiting the full delay.
61 * Wrap once at the app (or section) level; bare Tooltips still work without
62 * it via a per-instance fallback. */
63function TooltipProvider({
64 children,
65 delayDuration = DEFAULT_DELAY,
66 skipDelayDuration = 300,
67}: TooltipProviderProps) {
68 return (
69 <TooltipGroupContext.Provider value={true}>
70 <TooltipPrimitive.Provider
71 delayDuration={delayDuration}
72 skipDelayDuration={skipDelayDuration}
73 >
74 {children}
75// … truncated

What it pulls in

npm packages

  • framer-motion
  • @radix-ui/react-tooltip

Other registry items

  • utils
  • https://www.fluidfunctionalism.com/r/springs.json
  • https://www.fluidfunctionalism.com/r/font-weight.json
  • https://www.fluidfunctionalism.com/r/shape-context.json

Files it writes

  • registry/radix/tooltip.tsx

Facts

Registry
fluid-functionalism
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-02
Last confirmed
today

Go to the source

fluidfunctionalism.com mickadesign/fluid-functionalism on GitHub Raw registry item This item as JSON

More from fluid-functionalism

All 53 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Accordionaccordionfluid-functionalismComponentsFree3 deps
Accordion (Base UI)accordion-basefluid-functionalismComponentsFree3 deps
Ask User Questionsask-user-questionsfluid-functionalismComponentsFree2 deps
Badgebadgefluid-functionalismComponentsFree1 dep
Buttonbuttonfluid-functionalismComponentsFree4 deps
Button (Base UI)button-basefluid-functionalismComponentsFree4 deps
Cardcardfluid-functionalismComponentsFree1 dep
Chat Messagechat-messagefluid-functionalismComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex