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

Select

fluid-functionalism/select
FreeComponent

Animated select menu with collision-aware positioning, typeahead, proximity hover, spring-animated popover, and animated checkmark. Radix flavor.

Install it

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

Source

registry/radix/select.tsxfluidfunctionalism.com/r/select.json · first 6 KB
1"use client";
2
3import {
4 forwardRef,
5 useRef,
6 useEffect,
7 useState,
8 useCallback,
9 useMemo,
10 createContext,
11 useContext,
12 type ReactNode,
13 type HTMLAttributes,
14} from "react";
15import { motion, AnimatePresence } from "framer-motion";
16import { cva, type VariantProps } from "class-variance-authority";
17import * as SelectPrimitive from "@radix-ui/react-select";
18import type { IconComponent } from "@/lib/icon-context";
19import { cn } from "@/lib/utils";
20import { spring, exitFallbackMs } from "@/lib/springs";
21import { useProximityHover } from "@/hooks/use-proximity-hover";
22import { useShape } from "@/lib/shape-context";
23import { Elevated } from "@/lib/elevated";
24
25// ---------------------------------------------------------------------------
26// Select context
27//
28// Built on Radix Select, which owns positioning (popper collision flipping),
29// dismissal (outside press, Escape), list keyboard navigation + typeahead
30// (open and closed), combobox ARIA, and the hidden native <select> for forms.
31// This layer keeps the proximity-hover overlays, the
32// spring open/close animation, and the animated checkmark.
33//
34// Radix-specific notes (verified against @radix-ui/react-select 2.2.6 dist):
35//
36// - Value/placeholder: Radix shows the placeholder when its value is "" or
37// undefined, so the root is *always controlled* with our string state
38// ("" = no selection). Passing "" never flips controlled/uncontrolled, and
39// `data-placeholder` lands on the Trigger (not the Value span) — hence the
40// `group-data-[placeholder]:` variant on the value wrapper below.
41//
42// - Initial label: while closed, Radix renders Content's children into a
43// detached DocumentFragment; the selected SelectItem/ItemText therefore
44// mounts before the popup ever opens and portals its text into the Value
45// node. No item traversal is needed — SelectContent just has to render
46// unconditionally, never gated behind a
47// local mounted flag.
48//
49// - Exit animation: Radix Select has no Presence/forceMount, so the popup
50// unmounts the instant its `open` flips false. The root therefore keeps two
51// open states: `open` (immediate, drives the motion targets) and
52// `radixOpen` (what Radix sees; released via `unmount()` once the exit
53// tween finishes).
54//
55// - Radix Select is modal-ish: it scroll-locks the page and disables outside
56// pointer events while open. The Viewport's injected
57// stylesheet hides its own scrollbar, which would leave long lists with no
58// … truncated

What it pulls in

npm packages

  • @radix-ui/react-select
  • framer-motion
  • class-variance-authority
  • lucide-react

Other registry items

  • utils
  • https://www.fluidfunctionalism.com/r/springs.json
  • https://www.fluidfunctionalism.com/r/shape-context.json
  • https://www.fluidfunctionalism.com/r/surface-context.json
  • https://www.fluidfunctionalism.com/r/surface-classes.json
  • https://www.fluidfunctionalism.com/r/icon-context.json
  • https://www.fluidfunctionalism.com/r/use-proximity-hover.json
  • https://www.fluidfunctionalism.com/r/elevated.json

Files it writes

  • registry/radix/select.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