---
title: "JavaScript PDF viewer with thumbnails | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/web/user-interface/sidebar/thumbnail-preview/"
md_url: "https://www.nutrient.io/guides/web/user-interface/sidebar/thumbnail-preview.md"
last_updated: "2026-05-19T18:11:34.035Z"
description: "Enable the thumbnail preview sidebar to browse PDF pages, jump quickly to sections, and style thumbnail UI with CSS classes."
---

# Thumbnail preview in our JavaScript PDF viewer

Nutrient Web SDK’s UI features a sidebar with different available views.

The thumbnail preview sidebar shows a scrollable list of page thumbnails, which can be used to navigate to pages and get an overview of the content of any part of a document.

<!-- This partial is rendered in guide articles describing sidebars. -->

The thumbnails sidebar can be shown by the user by selecting the thumbnails sidebar icon from the sidebar dropdown in the toolbar.

It can also be shown programmatically with the API:

```js

instance.setViewState(viewState => viewState.set("sidebarMode", NutrientViewer.SidebarMode.THUMBNAILS);

```

Additionally, it’s possible to make it appear when the document is loaded by setting [`NutrientViewer.Configuration#initialViewState`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#initialViewState):

```js

NutrientViewer.load({
  initialViewState: new NutrientViewer.ViewState({
    sidebarMode: NutrientViewer.SidebarMode.THUMBNAILS
  })
});

```

The sidebar, which appears to the left of the viewport by default, can also be configured to appear to the right. To do this, you only need to set [`NutrientViewer.ViewState#sidebarPlacement`](https://www.nutrient.io/api/web/NutrientViewer.ViewState.html#sidebarPlacement):

```js

instance.setViewState(viewState => (
  viewState.set("sidebarPlacement", NutrientViewer.SidebarPlacement.END)
));

```

The image below shows how sidebar looks once placed using the previous snippet.

If you don’t want users to be able to open the thumbnails sidebar, you can hide the corresponding toolbar button by filtering it out from the [default toolbar items](https://www.nutrient.io/api/web/NutrientViewer.html#.defaultToolbarItems):

```js

NutrientViewer.setToolbarItems(items => items.filter(item => item.type!== "sidebar-thumbnails"));

```







The thumbnail view toolbar button can be styled with CSS using the public CSS class [`.PSPDFKit-Toolbar-Button-Sidebar-Thumbnails`](https://www.nutrient.io/api/web/css-Toolbar.html#.PSPDFKit-Toolbar-Button-Sidebar-Thumbnails).

The thumbnail sidebar itself can also be customized with CSS by modifying the corresponding public CSS classes:

- [`.PSPDFKit-Sidebar-Thumbnails-Page`](https://www.nutrient.io/api/web/css-Sidebar.html#.PSPDFKit-Sidebar-Thumbnails-Page)

- [`.PSPDFKit-Sidebar-Thumbnails-Page-Selected`](https://www.nutrient.io/api/web/css-Sidebar.html#.PSPDFKit-Sidebar-Thumbnails-Page-Selected)

- [`.PSPDFKit-Sidebar-Thumbnails-Page-Image`](https://www.nutrient.io/api/web/css-Sidebar.html#.PSPDFKit-Sidebar-Thumbnails-Page-Image)

- [`.PSPDFKit-Sidebar-Thumbnails-Page-Label`](https://www.nutrient.io/api/web/css-Sidebar.html#.PSPDFKit-Sidebar-Thumbnails-Page-Label)
---

## Related pages

- [Customizing the sidebar component in our JavaScript PDF viewer](/guides/web/user-interface/sidebar/customization.md)
- [Annotations list in our viewer sidebar](/guides/web/user-interface/sidebar/annotations-list.md)
- [Document outline in our JavaScript PDF viewer](/guides/web/user-interface/sidebar/document-outline.md)
- [Bookmark navigation in our JavaScript PDF viewer](/guides/web/user-interface/sidebar/bookmarks.md)
- [Hide or show sidebar navigation in our viewer](/guides/web/customizing-the-interface/controlling-the-sidebar-via-api.md)
- [Customizing the OCG layers icon in our PDF viewer UI](/guides/web/user-interface/sidebar/layers.md)
- [Navigate signed and unsigned signature fields in our PDF viewer sidebar](/guides/web/user-interface/sidebar/signatures-list.md)

