# PDFViewer.openPanel()

```ts
openPanel(panel: SidebarTab | null): boolean
```

Open a sidebar panel, or close the sidebar with `null`. Which panels are offered is the [sidebar](https://kernstra.com/docs/web-sdk/config/sidebar) option.

- Kind: method
- Since: 1.0.0

| Parameter | Type | Description |
| --- | --- | --- |
| `panel` | `SidebarTab \| null` | `'pages'`, `'outline'`, `'attachments'`, `'signatures'` or `'comments'`; `null` closes the sidebar. |

Returns `boolean`: `false` if that panel is not offered.

Throws:

- `INVALID_STATE` after `destroy()`.

```ts
viewer.openPanel('comments');
```

Part of [PDFViewer](https://kernstra.com/docs/web-sdk/api/pdfviewer) in the Kernstra Web SDK 1.0.0 API reference.

Web page: https://kernstra.com/docs/web-sdk/api/pdfviewer/openpanel
