Brand menu

Right-click a logo and, instead of the browser's menu, a dialog offers the brand's own actions.

Right-click me

runets

Features

  • A context-menu press on the logo opens a modal dialog of actions instead of the browser menu.
  • A plain click still follows the logo's link.
  • Actions are buttons or download links; clicking the backdrop closes it.

Use it for

  • Brand assets: the name, the mark, a press kit.

On this site

Installation

  1. Get runets.
    git clone https://github.com/ziyam-khan/runets
  2. Copy these files into your project, keeping their folders.
  3. Install what they use.
    pnpm add react
  4. Load the styles once. Bring your own base tokens, or use runets’ default theme.
    import 'runets/styles/theme.css'
    import 'runets/styles/kit.css'

API

PropTypeWhat it does
titlestringThe dialog heading.
actions{ label, onSelect? | href, download? }[]What it offers.
childrenReactElementThe logo.

Accessibility

Source

The code is in src/kit/brand-menu.tsx in runets, MIT licensed.