React component for shadcn/ui
Brand Context Menu
Share copy-ready and downloadable brand assets from a contextual menu.
Brand Context Menu is a React right-click menu for shadcn/ui that lets visitors copy your logo as SVG or download your full brand kit as a ZIP. Wrap your logo or a button in it so people can grab the right brand assets without asking.
Example
Features
- Copies the primary mark or logotype as raw SVG markup with sound, haptic, and inline icon feedback.
- Keeps the menu open after copying so the row can confirm the result.
- Keeps the menu compact with three focused actions.
- Downloads the complete SVG and PNG brand kit as a ZIP archive.
Installation
pnpm dlx shadcn@latest add @tentui/brand-context-menu
Brand asset hosting
The default TentUI SVGs and downloadable archive are served from
https://cdn.tentui.com/brand/. Use markAsset, logotypeAsset, and
brandAssetsZipPath to point the component at your own hosted assets.
Usage
import { BrandContextMenu } from "@/components/brand-context-menu";<BrandContextMenu>
<button type="button">Right-click for brand assets</button>
</BrandContextMenu>Pass custom mark and logotype assets and point the component to your archive.
const mark = {
name: "Mark",
path: "https://cdn.example.com/brand/mark.svg",
filename: "acme-mark.svg",
};
const logotype = {
name: "Logotype",
path: "https://cdn.example.com/brand/logotype.svg",
filename: "acme-logotype.svg",
};
<BrandContextMenu
markAsset={mark}
logotypeAsset={logotype}
brandAssetsZipPath="https://cdn.example.com/brand/acme-brand-assets.zip"
>
<button type="button">Open brand kit</button>
</BrandContextMenu>;API reference
Credits
FAQ
How do I install the Brand Context Menu with shadcn?
Run npx shadcn@latest add @tentui/brand-context-menu after adding the
@tentui registry to components.json
(installation guide), or run
npx shadcn@latest add https://tentui.com/r/brand-context-menu.json without
it. The CLI copies brand-context-menu.tsx into your project, installs
lucide-react, and adds the shadcn context-menu and TentUI
Copy Button it builds on.
How do I use my own logo and brand kit?
Pass markAsset and logotypeAsset, each with a name, a path to the SVG,
and a filename, and set brandAssetsZipPath to your archive. Without them the
menu serves TentUI's own assets from cdn.tentui.com.
Why does "Copy Mark as SVG" show "Copy failed"?
The menu fetches the SVG and copies its markup, so the copy fails if that
request fails. Host the SVG on the same origin or serve it with CORS headers
that allow your site; clipboard access also needs a secure context such as
HTTPS or localhost.
Does it work with Radix-based shadcn/ui components?
It is written for shadcn/ui's Base UI components: the trigger uses the render
prop and the copy rows use closeOnClick={false} to stay open after copying.
With a Radix-based context-menu, use asChild on the trigger and call
event.preventDefault() in the copy rows' onSelect instead.
What can I right-click to open the menu?
Any single React element passed as children, such as the logo link in your
header. The menu opens on that element's context menu event, so the rest of the
page keeps the browser's default menu.
Is the Brand Context Menu free to use?
Yes. The Brand Context Menu is free and source-available: the shadcn CLI copies its source into your project, and you can use it in unlimited personal and client projects under the TentUI License. The license doesn't allow redistributing or reselling the component itself.
Related components
All navigation, menus, and overlays- Component Sidebar
Navigate dense component libraries with tactile, proximity-reactive guide lines.
- Dynamic Island
An iPhone-style pill that morphs between an idle pill, a compact live activity, and an expanded card, with a liquid spring, a sound and a haptic per morph, and swipe up to dismiss.
- Fluid Tooltip
One shared tooltip for a toolbar, rail, or dock. Slide between buttons and a single quiet bubble glides with you on soft springs, settles without overshoot, and crossfades to the new label.
- Hover Peek Card
Hover or long-press lifts a rich preview card from its trigger on an origin-aware spring, with safe-corridor hover bridges, group skip-delay handoffs, and touch dismiss scrims.