Links

Supported UI Elements

Descriptions and examples of MailExtension APIs to interact with Thunderbird's user interface.

Browser Action

A browser action adds a button to Thunderbird's main toolbar:
It is controlled by the browser_action manifest key in the extension's manifest.json file:
"browser_action": {
"default_title": "Restart",
"default_icon" : "restart.png",
"default_popup": "browser_popup.html"
},
If a default_popup is defined, a popup will be opened and the defined html page will be loaded, when the button is clicked. Additionally, you can use the browserAction API in your background script to interact with the button to modify badge text, icon, title or its enabled state.
Note: The browserAction API has been renamed to action in Manifest V3.

Compose Action

A compose action adds a button to the toolbar of the composer window:
It is controlled by compose_action manifest key in the extension's manifest.json file:
"compose_action": {
"default_title": "Expand lists",
"default_icon" : "lists.png",
"default_popup": "compose_popup.html"
},
If a default_popup is defined, a popup will be opened and the defined html page will be loaded, when the button is clicked. Additionally, you can use the composeAction API in your background script to interact with the button to modify badge text, icon, title or its enabled state.

Message Display Action

A message display action adds a button to the toolbar of the message view window:
It is controlled by the message_display_action manifest key in the extension's manifest.json file:
"message_display_action": {
"default_title": "Copy Patch",
"default_icon" : "patch.png",
"default_popup": "message_popup.html"
},
If a default_popup is defined, a popup will be opened and the defined html page will be loaded, when the button is clicked. Additionally, you can use the messageDisplayAction API in your background script to interact with the button to modify badge text, icon, title or its enabled state.

CloudFile Provider Configuration

Thunderbird supports cloud providers to upload large attachments to a server, instead of attaching them directly to the email. Extensions can register such cloud providers using the CloudFile API. These providers can be managed in Thunderbird's Composition options:
The menus API allows modifying Thunderbird's menus by adding or overriding menu items. The menu items can be added to different menus based on the provided context type. The following values are currently supported:
all
All allowed contexts, excluding tab.
all_message_attachments
Context menu on the summary of the message attachments.
If the message has only one attachment, then the message_attachments context is used instead.
browser_action, compose_action , message_display_action
Context menu of action buttons.
compose_attachments
Context menu of attachments in the compose window.
editable, password
Context menu of text/password input fields in WebExtension windows, web tabs or message display tabs.
Limited to content areas.
folder_pane
Context menu of the folder pane of mail tabs. Not limited to a folder entry.
image, audio, video
Context menu of embedded images, audio or video players in WebExtension windows, web tabs or message display tabs. Limited to content areas.
link
Context menu of links in WebExtension windows, in web tabs or in message display tabs.
Limited to content areas.
message_attachments
Context menu of a single message in the attachments area.
message_list
Context menu of the message list area of a mail tab. Not limited to a message list entry.
page, frame
Context menu of WebExtension windows, web tabs or message display tabs, if none of the other content contexts apply (link, selection, image, audio, video, editable, password).
If the page is loaded inside a frame, the frame context applies, otherwise the page context. Limited to content areas.
selection
Context menu in WebExtension windows, web tabs or message display tabs, if any text has been selected.
Limited to content areas.
tab
Context menu of tab ribbons.
``