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

Card

fluid-functionalism/card
FreeComponent

shadcn's compositional card (Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter) with the Fluid Functionalism layer: transparent substrate, weight-animated title, media/logo/feature/image slots, and a CardGroup that owns stacked, inline, and grid layouts plus 2-D proximity-hover highlighting.

Install it

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

Source

registry/default/card.tsxfluidfunctionalism.com/r/card.json · first 6 KB
1"use client";
2
3import {
4 Children,
5 cloneElement,
6 createContext,
7 forwardRef,
8 isValidElement,
9 useContext,
10 useEffect,
11 useMemo,
12 useRef,
13 type HTMLAttributes,
14 type ReactElement,
15 type ReactNode,
16} from "react";
17import Link from "next/link";
18import { motion, AnimatePresence } from "framer-motion";
19import { cn } from "@/lib/utils";
20import { spring } from "@/lib/springs";
21import { fontWeights } from "@/lib/font-weight";
22import { useShape } from "@/lib/shape-context";
23import { useIcon, type IconComponent } from "@/lib/icon-context";
24import { useProximityHover } from "@/hooks/use-proximity-hover";
25
26// ---------------------------------------------------------------------------
27// Card is shadcn/ui's compositional card — the same parts and `data-slot`
28// contract (Card, CardHeader, CardTitle, CardDescription, CardAction,
29// CardContent, CardFooter) — with the Fluid Functionalism layer on top:
30// design tokens, a weight-animated title, and a sibling CardGroup that owns
31// layout (stacked list, inline rows, or grid) plus the magnetic proximity
32// highlight that previews where a click will land.
33//
34// Unlike stock shadcn, the surface is transparent and borderless by default:
35// cards inherit whatever substrate their parent provides (see the Surfaces
36// system) and lean on hairline dividers / the proximity highlight rather than
37// a drawn frame. A Card renders fine on its own; inside a CardGroup it
38// registers itself so the group's highlight can find it.
39// ---------------------------------------------------------------------------
40
41type CardOrientation = "card" | "inline";
42type CardBorder = "none" | "outlined";
43
44// ── Group context ────────────────────────────────────────
45
46interface CardGroupContextValue {
47 registerItem: (index: number, element: HTMLElement | null) => void;
48 activeIndex: number | null;
49 /** Index of the persistently-selected card, or -1. Its neighbours drop the
50 * hairline that would otherwise cut across the selection fill. */
51 selectedIndex: number;
52 orientation: CardOrientation;
53 columns: number;
54 count: number;
55 /** Individual cards carry their own border/tile shape (separated grids). */
56 separated: boolean;
57 /** Inner hairline dividers are drawn between adjacent cards. */
58 divided: boolean;
59 outlined: boolean;
60}
61
62const CardGroupContext = createContext<CardGroupContextValue | null>(null);
63
64// … 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/shape-context.json
  • https://www.fluidfunctionalism.com/r/icon-context.json
  • https://www.fluidfunctionalism.com/r/use-proximity-hover.json

Files it writes

  • registry/default/card.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
Chat Messagechat-messagefluid-functionalismComponentsFree1 dep
Checkbox Groupcheckbox-groupfluid-functionalismComponentsFree2 deps
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