BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/Unlumen Ui/expand-menu

Expand Menu

unlumen-ui/expand-menu
FreeComponent

An animated expanding menu that reveals items from a trigger button, with configurable direction, layout, and alignment.

Install it

npx shadcn@latest add https://ui.unlumen.com/r/expand-menu.json

Source

registry/components/unlumen/expand-menu/index.tsxui.unlumen.com/r/expand-menu.json
1"use client";
2
3import * as React from "react";
4import { motion, AnimatePresence } from "motion/react";
5import { cn } from "@/lib/utils";
6
7export type ExpandMenuItemType = {
8 icon: React.ReactNode;
9 label: string;
10 onClick?: () => void;
11};
12
13export type ExpandMenuProps = {
14 items: ExpandMenuItemType[];
15 direction?: "up" | "down" | "left" | "right";
16 showLabels?: boolean;
17 triggerIcon?: React.ReactNode;
18 className?: string;
19};
20
21// anchor so the trigger stays in place while items expand away from it
22const anchorStyle: Record<string, React.CSSProperties> = {
23 down: { top: 0, left: 0 },
24 right: { top: 0, left: 0 },
25 up: { bottom: 0, left: 0 },
26 left: { top: 0, right: 0 },
27};
28
29// "up" / "left" need the trigger last so it stays at the anchor corner
30const triggerLast = (d: string) => d === "up" || d === "left";
31
32const flexDirMap: Record<string, React.CSSProperties["flexDirection"]> = {
33 down: "column",
34 up: "column",
35 right: "row",
36 left: "row",
37};
38
39function TriggerButton({
40 open,
41 triggerIcon,
42 onClick,
43}: {
44 open: boolean;
45 triggerIcon?: React.ReactNode;
46 onClick: () => void;
47}) {
48 return (
49 <motion.button
50 layout
51 onClick={onClick}
52 aria-expanded={open}
53 style={{ borderRadius: 9999, flexShrink: 0 }}
54 className="flex items-center justify-center w-9 h-9 hover:bg-gray-100 active:bg-gray-200 transition-colors cursor-pointer"
55 >
56 <motion.span
57 animate={{ rotate: open ? 45 : 0 }}
58 transition={{ type: "spring", stiffness: 400, damping: 28 }}
59 className="flex items-center justify-center"
60 >
61 {triggerIcon ?? (
62 <svg
63 width="16"
64 height="16"
65 viewBox="0 0 16 16"
66 fill="currentColor"
67 className="text-gray-700"
68 >
69 <path d="M8 2a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm0 4.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm0 4.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3z" />
70 </svg>
71 )}
72 </motion.span>
73 </motion.button>
74 );
75}
76
77function MenuItem({
78 icon,
79 label,
80 onClick,
81 index,
82 showLabels,
83}: ExpandMenuItemType & { index: number; showLabels: boolean }) {
84 return (
85 <motion.button
86 layout
87 initial={{ opacity: 0, scale: 0.7 }}
88 animate={{ opacity: 1, scale: 1 }}
89 exit={{ opacity: 0, scale: 0.7 }}
90 transition={{
91 delay: index * 0.04,
92 type: "spring",
93 stiffness: 400,
94 damping: 28,
95 }}
96 onClick={onClick}
97// … truncated

What it pulls in

npm packages

  • motion

Files it writes

  • registry/components/unlumen/expand-menu/index.tsx

Facts

Registry
Unlumen Ui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-11
Last confirmed
today

Go to the source

Docs on Unlumen Ui ui.unlumen.com leovvx/unlumen-ui-docs on GitHub Raw registry item This item as JSON

More from Unlumen Ui

All 233 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AI Chatai-chatUnlumen UiComponentsPaid2 deps
Vercel Animate Countanimate-countUnlumen UiComponentsFree1 dep
Animate Digitsanimate-digitsUnlumen UiComponentsFree1 dep
Animated Inputanimate-text-input-typingUnlumen UiComponentsPaid1 dep
Animated Listanimated-listUnlumen UiComponentsFree1 dep
Apple Switchapple-switchUnlumen UiComponentsFree1 dep
Aurora Barsaurora-barsUnlumen UiComponentsFree1 dep
Aurora Bluraurora-blurUnlumen UiComponentsFree2 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