sidePanel

The sidePanel API allows an extension to display its own persistent UI in the browser's side panel.

What it does

  • Enables an extension to register an HTML file to be shown in the side panel.
  • The side panel can be opened by the user via the extension's action icon or programmatically by the extension.
  • The content of the side panel can be enabled globally for all tabs or set on a per-tab basis. This allows for context-specific UIs.

When to use it

Use the side panel for features that users might want to keep open and refer to while browsing different pages. It's a great alternative to popups for more complex UIs that require more space and persistence.

Examples:

  • A note-taking extension.
  • A bookmark manager.
  • A web-clipping tool that shows a list of saved clips.
  • A developer tool that displays contextual information about the current page.

Manifest Declaration

{
  "name": "My Side Panel Extension",
  "version": "1.0",
  "manifest_version": 3,
  "permissions": [
    "sidePanel"
  ],
  "action": {
    "default_title": "Click to open side panel"
  },
  "side_panel": {
    "default_path": "sidepanel.html"
  }
}

Security & Privacy

Why is it not risky?

This is a very safe permission. It only allows an extension to show its user interface in the side panel of the browser.

By itself, this permission grants no access to your data. The risk of an extension depends on the other permissions it asks for to power the features inside its side panel.

API Usage Example

This example shows how to open the side panel programmatically when the user clicks the extension's action icon. This is useful if you want the icon to perform another action by default.

// background.js

// Opt in to the built-in behavior of opening the side panel
// when the user clicks the extension's action icon. Without this
// call, clicking the action icon does NOT auto-open the panel
// (the manifest's `default_path` only registers the panel content).
chrome.sidePanel
  .setPanelBehavior({ openPanelOnActionClick: true })
  .catch((error) => console.error(error));

// Example: Set a different side panel for a specific website.
chrome.tabs.onUpdated.addListener(async (tabId, info, tab) => {
  if (!tab.url) return;
  const url = new URL(tab.url);
  if (url.origin === 'https://developer.chrome.com') {
    await chrome.sidePanel.setOptions({
      tabId,
      path: 'developer_sidepanel.html',
      enabled: true
    });
  } else {
    // Disable the side panel on other sites.
    await chrome.sidePanel.setOptions({
      tabId,
      enabled: false
    });
  }
});

Extensions with the sidePanel permission

Here are some popular browser extensions that use the "sidePanel" permission. To explore more, try our Advanced search.

Permission Metrics

Popularity

Security Risk


Usage by Platform