Chanhdai
componentbrand-assets-menusource: ok · refreshed
Brand Assets Menu
Context menu for copying brand SVGs and opening asset links.
npx shadcn add "https://chanhdai.com/r/brand-assets-menu.json"free
Where it goes
logo-cloud
Interaction
dropdown
Tags auto-generated by rules on 9/24/2026 — empty means no evidence, not lack of support.
Dependencies
Bundle weight · lighticonslucide-react
Registry dependencies
context-menutoast
Files1 · source cached 10/3/2026, 8:34:01 AM
src/registry/components/brand-assets-menu/brand-assets-menu.tsx
"use client"
import { useTiks } from "@rexa-developer/tiks/react"
import { DownloadIcon, SquareDashedIcon, TypeIcon } from "lucide-react"
import {
ContextMenu,
ContextMenuContent,
ContextMenuItem,
ContextMenuSeparator,
ContextMenuTrigger,
} from "@/components/ui/context-menu"
import { toast } from "@/components/ui/toast"
export type BrandAssetsMenuProps = {
logomark: React.ReactElement
logomarkSVG: string
logotypeSVG: string
brandGuidelinesURL: string
brandAssetsURL: string
children: React.ReactElement
}
export function BrandAssetsMenu({
logomark,
logomarkSVG,
logotypeSVG,
brandGuidelinesURL,
brandAssetsURL,
children,
}: BrandAssetsMenuProps) {
const { success } = useTiks()
return (
<ContextMenu>
<ContextMenuTrigger render={children} />
<ContextMenuContent className="w-fit">
<ContextMenuItem
onClick={() => {
copyText(logomarkSVG)
toast.add({ type: "success", title: "Logomark as SVG copied" })
success()
}}
>
{logomark}
Copy Logomark as SVG
</ContextMenuItem>
<ContextMenuItem
onClick={() => {
copyText(logotypeSVG)
toast.add({ type: "success", title: "Logotype as SVG copied" })
success()
}}
>
<TypeIcon />
Copy Logotype as SVG
</ContextMenuItem>
<ContextMenuSeparator />
<ContextMenuItem
render={
<a
href={brandGuidelinesURL}
target="_blank"
rel="noopener noreferrer"
/>
}
>
<SquareDashedIcon />
Brand Guidelines
</ContextMenuItem>
<ContextMenuItem
render={
<a
href={brandAssetsURL}
target="_blank"
rel="noopener noreferrer"
download
/>
}
>
<DownloadIcon />
Download Brand Assets
</ContextMenuItem>
</ContextMenuContent>
</ContextMenu>
)
}
const copyText = async (text: string) => {
try {
await navigator.clipboard.writeText(text)
return true
} catch {
return false
}
}