---
title: Popup and hub
description: The floating button, the panel and its dock modes, the splitter, the pop-out window, the hub rail and deep links.
---
A floating button on your page opens the devtools in a panel. With the hub mounted, the panel shows every tool in a side rail.
# Popup and hub
When the overlay loads, a floating button appears in the bottom-right corner of your page. Click it to open the devtools in a panel on top of your app. You don't need a browser extension.
## The floating button
### Where it comes from
Importing the [overlay](./overlay.md) adds the button. The first time the panel opens, it looks for the devtools server:
1. If the overlay connected, it uses that path. When the path is `pangular/` and a hub answers at ``, it opens the hub.
2. Otherwise it checks for the hub at `/__devframes/`, then for the devtools alone in the places the overlay looks: `/__devframes/pangular/`, `/__pangular/`, next to the page and `/__devframe/`.
A path counts only when it answers with JSON. If nothing answers, the panel says **No devtools server found** with a **Try again** button, and looks again the next time it opens.
### Create it yourself
Most apps never call the popup API. To add the button without the overlay, call `createDevtoolsPopup()`:
```ts
// src/main.ts
import {createDevtoolsPopup} from '@pangular-inspector/devtools/popup';
createDevtoolsPopup();
```
It adds the button and returns a handle with `toggle()` and `destroy()`. The panel finds the devtools server as described above. Importing the popup module in the browser also adds the button on its own, so calling it again returns the same handle.
To open a fixed page instead, pass `src`:
```ts
// src/main.ts
import {createDevtoolsPopup} from '@pangular-inspector/devtools/popup';
createDevtoolsPopup({src: '/__my-devtools/'});
```
A `src` given to a later call replaces the one before. `showDevtools()` adds the button when it is missing, and `hideDevtools()` removes it.
The popup alone sends no live data. Load the overlay for that.
### Match your app colors
The button reads CSS variables from your page. Set them on `:root` to match your app:
```css
/* src/styles.css */
:root {
--pangular-accent: #f5a524; /* button background */
--pangular-accent-ink: #1c1300; /* button icon */
--pangular-title: #f5a524; /* panel title and active dock mode */
}
```
The values above are the defaults.
## The panel
### Dock modes
A free panel on top of your app. Drag it by the toolbar with a mouse, finger or pen, and resize it from the corner.
Full width, 40% of the viewport height until you resize it. Drag the splitter on its top edge.
40% of the viewport width until you resize it, full height. Drag the splitter on its left edge.
You can drag only the floating panel. Switch modes from the buttons in the panel toolbar, or from the [command palette](./command-palette.md). The floating panel always stays inside the window: when the window shrinks, the panel moves and shrinks to fit, and grows back to its saved size when there is room again.
### Resize a docked panel
A docked panel has a splitter on the edge that faces your app. Drag it with a mouse, finger or pen, or focus it with Tab and use the keyboard:
| Key | Bottom dock | Right dock |
| ---------------------------------- | --------------------------------- | --------------------------------- |
| ↑ and ↓ | Taller and shorter by 16 pixels | Nothing |
| ← and → | Nothing | Wider and narrower by 16 pixels |
| Shift with an arrow key | 64 pixels at a time | 64 pixels at a time |
| Home and End | The smallest and the largest size | The smallest and the largest size |
A bottom dock is at least 120 pixels high and a right dock at least 280 pixels wide. Both leave 48 pixels of the window for your app. Double-click the splitter, or run **Popup: reset the docked size** from the command palette, to go back to 40%. The bottom and right docks each keep their own size, and a saved size shrinks to fit a smaller window.
Screen readers announce the splitter as a separator named **Resize the panel**, with its current, smallest and largest size in pixels.
### Open in its own window
The **Open in its own window** button in the panel toolbar, or **Popup: open in its own window** in the command palette, opens the panel in a separate browser window and closes it on the page. Use it to keep the devtools on a second screen.
The window shows the full panel without the hub rail, and its address carries the page's id (`?pageId=`), so it keeps showing this browser tab after a reload of the app. If you passed `src` to `createDevtoolsPopup`, the window opens that address instead. Each tab gets its own window, and popping out again reuses it.
To bring the panel back into the page, click the floating button (its name is **Bring Pangular Inspector back into the page** while the window is open), press the popup shortcut, or run **Popup: back into the page** from the command palette in the window. Each closes the window and opens the panel on the page. Closing the window yourself also gives the button its usual job back.
If the browser blocks the window, the panel stays on the page and says so. Allow pop-ups for your app's address and try again.
### Top layer
The button and the panel sit in the browser top layer, like a `