avatarMenu
Entries the plugin adds to the avatar's menu, the menu of the open profile. They are for a quick action, reachable from any page.
Where in Hodi
On a computer, the avatar's menu opens from the avatar, at the bottom of the sidebar. On a phone or a tablet, this menu's entries sit at the bottom of the profile's sheet. The plugin's avatarMenu entries join Hodi's entries.
Example
avatarMenu is a list of entries, not a component: Hodi draws each entry itself.
web/index.tsx
import { definePlugin } from 'hodi:sdk'
import { House } from 'lucide-react'
definePlugin({
avatarMenu: [
{
id: 'switch',
label: 'menu.switch',
icon: House,
onClick: () => openSwitcher()
}
]
})An entry's fields
Field?: optional
idstringThe entry's technical name, once per plugin.
labelstringThe entry's text, a key of the plugin's locales.
icon?ComponentTypeA Lucide icon, at 16 px. Without an icon, Hodi shows a puzzle piece.
onClick() => voidWhat a click on the entry does.