BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/rare-ui/family-drawer

Family Drawer

rare-ui/family-drawer
FreeComponent

A bottom drawer with smooth, morphing transitions between stacked views, inspired by the Family app. Built on Vaul.

Install it

npx shadcn@latest add https://rareui.com/r/family-drawer.json

Source

components/ui/family-drawer.tsxrareui.com/r/family-drawer.json · first 6 KB
1"use client";
2
3import { useMemo, useRef, useState, type ReactNode } from "react";
4
5type SetView = (view: string) => void;
6import { Drawer } from "vaul";
7import useMeasure from "react-use-measure";
8import { motion, AnimatePresence } from "motion/react";
9import clsx from "clsx";
10
11
12export default function FamilyDrawer() {
13 const [isOpen, setIsOpen] = useState(false);
14 const [view, setView] = useState("default");
15 const [elementRef, bounds] = useMeasure();
16 const previousHeightRef = useRef<number | null>(null);
17
18 const content = useMemo(() => {
19 switch (view) {
20 case "default":
21 return <DefaultView setView={setView} />;
22 case "remove":
23 return <RemoveWallet setView={setView} />;
24 case "phrase":
25 return <Phrase setView={setView} />;
26 case "key":
27 return <Key setView={setView} />;
28 }
29 }, [view]);
30
31 const opacityDuration = useMemo(() => {
32 const MIN_DURATION = 0.15;
33 const MAX_DURATION = 0.27;
34
35 if (!previousHeightRef.current) {
36 previousHeightRef.current = bounds.height;
37 return MIN_DURATION;
38 }
39
40 const heightDifference = Math.abs(
41 bounds.height - previousHeightRef.current,
42 );
43 previousHeightRef.current = bounds.height;
44
45 const duration = Math.min(
46 Math.max(heightDifference / 500, MIN_DURATION),
47 MAX_DURATION,
48 );
49
50 return duration;
51 }, [bounds.height]);
52
53 return (
54 <>
55 <button
56 className="focus-visible:shadow-focus-ring-button absolute top-1/2 left-1/2 h-[44px] -translate-x-1/2 -translate-y-1/2 rounded-full border border-gray-200 bg-white px-4 py-2 font-medium text-black transition-colors hover:bg-[#F9F9F8] md:font-medium dark:border-none dark:bg-muted dark:shadow-sm dark:text-foreground dark:hover:bg-muted"
57 onClick={() => setIsOpen(true)}
58 style={{ fontFamily: "var(--font-open-runde)" }}
59 >
60 Try it out
61 </button>
62 <Drawer.Root open={isOpen} onOpenChange={setIsOpen}>
63 <Drawer.Portal>
64 <Drawer.Overlay
65 className="fixed inset-0 z-[60] bg-black/30 backdrop-blur-xs"
66 onClick={() => setIsOpen(false)}
67 />
68 <Drawer.Content
69 asChild
70// … truncated

What it pulls in

npm packages

  • motion
  • vaul

Other registry items

  • utils

Files it writes

  • components/ui/family-drawer.tsx

Facts

Registry
rare-ui
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

rareui.com swamimalode07/rare-ui on GitHub Raw registry item This item as JSON

More from rare-ui

All 13 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Bounce Sidebarbounce-sidebarrare-uiComponentsFree1 dep
Code Blockcode-blockrare-uiComponentsFree3 deps
Duration Pickerduration-pickerrare-uiComponentsFree5 deps
Emoji Reactionemoji-reactionrare-uiComponentsFree4 deps
Fluid Orbfluid-orbrare-uiComponentsFreeno deps
Folder Componentfolder-componentrare-uiComponentsFree1 dep
GitHub Activitygithub-activityrare-uiComponentsFree1 dep
Gravity Lettersgravity-lettersrare-uiComponentsFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex