BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/tripled/context-menu-bubble-shadcnui

Context Menu Bubble

tripled/context-menu-bubble-shadcnui
FreeComponent

Right-click reveals circular expanding radial menu with icons

Live preview

live · rendered by the registry
Rendered by tripled on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://ui.tripled.work/r/context-menu-bubble-shadcnui.json

Source

@uitripled/react-shadcn/src/components/motion-core/context-menu-bubble.tsxui.tripled.work/r/context-menu-bubble-shadcnui.json
1"use client";
2
3import { AnimatePresence, motion } from "framer-motion";
4import { Copy, Edit, MoreVertical, Share2, Trash2 } from "lucide-react";
5import { MouseEvent, useRef, useState } from "react";
6
7type MenuItem = {
8 label: string;
9 icon: React.ReactNode;
10 onClick: () => void;
11 danger?: boolean;
12};
13
14type ContextMenuBubbleProps = {
15 items?: MenuItem[];
16};
17
18export function ContextMenuBubble({
19 items = [
20 { label: "Edit", icon: <Edit className="h-4 w-4" />, onClick: () => {} },
21 { label: "Copy", icon: <Copy className="h-4 w-4" />, onClick: () => {} },
22 { label: "Share", icon: <Share2 className="h-4 w-4" />, onClick: () => {} },
23 {
24 label: "Delete",
25 icon: <Trash2 className="h-4 w-4" />,
26 onClick: () => {},
27 danger: true,
28 },
29 ],
30}: ContextMenuBubbleProps) {
31 const [isOpen, setIsOpen] = useState(false);
32 const [position, setPosition] = useState({ x: 0, y: 0 });
33 const triggerRef = useRef<HTMLButtonElement>(null);
34 const containerRef = useRef<HTMLDivElement>(null);
35
36 const updatePosition = () => {
37 if (triggerRef.current && containerRef.current) {
38 const buttonRect = triggerRef.current.getBoundingClientRect();
39 const containerRect = containerRef.current.getBoundingClientRect();
40 setPosition({
41 x: buttonRect.left + buttonRect.width / 2 - containerRect.left,
42 y: buttonRect.top + buttonRect.height / 2 - containerRect.top,
43 });
44 }
45 };
46
47 const handleContextMenu = (e: MouseEvent) => {
48 e.preventDefault();
49 updatePosition();
50 setIsOpen(true);
51 };
52
53 const handleClick = () => {
54 updatePosition();
55 setIsOpen(!isOpen);
56 };
57
58 const closeMenu = () => setIsOpen(false);
59
60 const itemCount = items.length;
61 const radius = 80;
62 const angleStep = (2 * Math.PI) / itemCount;
63
64 return (
65 <div
66 ref={containerRef}
67 className="relative flex h-64 w-full items-center justify-center overflow-hidden rounded-2xl"
68 >
69 <motion.button
70 ref={triggerRef}
71 onContextMenu={handleContextMenu}
72 onClick={handleClick}
73 whileHover={{ scale: 1.1 }}
74 whileTap={{ scale: 0.9 }}
75 className="flex h-12 w-12 items-center justify-center rounded-full bg-primary text-primary-foreground"
76 >
77 <MoreVertical className="h-5 w-5" />
78 </motion.button>
79
80 <AnimatePresence>
81 {isOpen && (
82 <>
83 <motion.div
84 initial={{ opacity: 0 }}
85 animate={{ opacity: 1 }}
86// … truncated

What it pulls in

npm packages

  • framer-motion
  • react

Other registry items

  • button

Files it writes

  • @uitripled/react-shadcn/src/components/motion-core/context-menu-bubble.tsx

Facts

Registry
tripled
Type
registry:component
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-02
Last confirmed
today

Go to the source

Docs on tripled ui.tripled.work moumen-soliman/uitripled on GitHub Raw registry item This item as JSON

More from tripled

All 282 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AI Chat Interfaceai-chat-interface-shadcnuitripledComponentsFree2 deps
AI Glow Inputai-glow-input-shadcnuitripledComponentsFree2 deps
AI Loading Skeletonai-loading-skeleton-shadcnuitripledComponentsFree2 deps
AI Response Typing Streamai-response-typing-shadcnuitripledComponentsFree2 deps
AI Unlock Animationai-unlock-animation-shadcnuitripledComponentsFree2 deps
Animated Accordionanimated-accordion-shadcnuitripledComponentsFree2 deps
Animated Card Stackanimated-card-stack-baseuitripledComponentsFree2 deps
Animated Card Stackanimated-card-stack-shadcnuitripledComponentsFree2 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