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/table

Table

fluid-functionalism/table
FreeComponent

Animated table with proximity-based row hover highlighting and fluid border transitions. Includes TableHeader, TableBody, TableRow, TableHead, and TableCell sub-components.

Install it

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

Source

registry/default/table.tsxfluidfunctionalism.com/r/table.json · first 6 KB
1"use client";
2
3import {
4 useRef,
5 useEffect,
6 useMemo,
7 createContext,
8 useContext,
9 forwardRef,
10 type ReactNode,
11 type HTMLAttributes,
12 type TdHTMLAttributes,
13 type ThHTMLAttributes,
14} from "react";
15import { motion, AnimatePresence } from "framer-motion";
16import { cn } from "@/lib/utils";
17import { spring } from "@/lib/springs";
18import { fontWeights } from "@/lib/font-weight";
19import { useProximityHover } from "@/hooks/use-proximity-hover";
20
21// ── Context ──────────────────────────────────────────────
22
23interface TableContextValue {
24 registerItem: (index: number, element: HTMLElement | null) => void;
25 activeIndex: number | null;
26}
27
28const TableContext = createContext<TableContextValue | null>(null);
29
30// ── Table ────────────────────────────────────────────────
31
32interface TableProps extends HTMLAttributes<HTMLTableElement> {
33 children: ReactNode;
34}
35
36const Table = forwardRef<HTMLTableElement, TableProps>(
37 ({ children, className, ...props }, ref) => {
38 const containerRef = useRef<HTMLDivElement>(null);
39
40 const {
41 activeIndex,
42 itemRects,
43 sessionRef,
44 handlers,
45 registerItem,
46 measureItems,
47 } = useProximityHover(containerRef);
48
49 useEffect(() => {
50 measureItems();
51 }, [measureItems, children]);
52
53 const activeRect = activeIndex !== null ? itemRects[activeIndex] : null;
54
55 const contextValue = useMemo(
56 () => ({ registerItem, activeIndex }),
57 [registerItem, activeIndex]
58 );
59
60 return (
61 <TableContext.Provider value={contextValue}>
62 <div
63 ref={containerRef}
64 className="relative"
65 onMouseEnter={handlers.onMouseEnter}
66 onMouseMove={handlers.onMouseMove}
67 onMouseLeave={handlers.onMouseLeave}
68 >
69 {/* Hover background */}
70 <AnimatePresence>
71 {activeRect && (
72 <motion.div
73 key={sessionRef.current}
74 className="absolute bg-hover pointer-events-none"
75 initial={{
76 opacity: 0,
77 top: activeRect.top,
78 left: activeRect.left,
79 width: activeRect.width,
80 height: activeRect.height,
81 }}
82 animate={{
83 opacity: 1,
84// … truncated

What it pulls in

npm packages

  • framer-motion

Other registry items

  • utils
  • https://www.fluidfunctionalism.com/r/springs.json
  • https://www.fluidfunctionalism.com/r/font-weight.json
  • https://www.fluidfunctionalism.com/r/use-proximity-hover.json

Files it writes

  • registry/default/table.tsx

Facts

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

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