Use the Document Library web part

Applies to: SharePoint Online, Office for business, SharePoint Server 2019, SharePoint Online admin centre, SharePoint Online operated by 21Vianet.

After you add a modern page to a site, you can add and customise web parts, which are the stepping stones of your page. This article summarises the Document Library web part, which allows you to display a document library. 

Once you use the document library web part, you can decide to present a specific view of the library or even a folder within the library. Users with appropriate permissions can add, view or edit files directly from the web part. Users can also pin a document to the top of the library, download, delete and rename files, or can go the full document library by clicking See all. Furthermore, files can be displayed in a details view or tiles view, and column formatting and nested folders created in the source list are shown.

Note: Some functionality is introduced gradually to organisations that have opted in to the Targeted Release programme. This means that you may not yet see this feature or it may look different than what is described in the help articles.


Document Library web part on a modern page.

Add a document library to a page

  1. If you want a custom view of your library to emerge on your page, create the view.
  1. Visit the page where you want to add the library.
  1. If your page is not already in edit mode, pick Edit at the top right of the page.

Hover your mouse atop or beneath an existing web part and you’ll see a line with a circled +, like so:

  1. Press +, and then choose Document Library from the list of web parts.
Plus sign for adding web parts to a page
  1. Choose your desired document library to apply on your page.
Select a document library to put on a page
  1. Select Edit web part Web part edit button on the left side to update the Document library, the View of your library, and the size. You can also present a specific folder in the library by typing the folder name (use a “/” to separate the names of nested folders):
  1. Once you’re done, press Apply.
  1. Once you’re finished, select Publish at the top right of your page.

View documents in a list or as tiles

Users can select the right of the toolbar to alter the view of the library from Details (a list view) to Tiles (to view files as icons).

Tiled view in document library

Add new or upload documents

In the web part, users can create new folders and documents and/or upload files and folders. The most common way to add files and folders is to drag them into the library from a different location.

You can also insert or upload documents by using the toolbar:

  • Press + New, and pick Folder or a document type. Or, select + Upload, and click Files or Folder.

New and Upload commands

Download, Rename, Delete, and Pin to top

  • Once a file is chosen, you can perform several actions, such as download the file, rename it, delete it, or pin it to the top of the library for easy access.Delete, Download, and Rename commands

Sort, filter, or group items within the document library web part

In the web part, users can sort, filter, and group items. The actions done in the web part do not affect the deeper library, and are visible for only the current session.

  1. Press the down arrow beside the title of the column you want to sort, filter, or group.
  1. Choose your preferred action to take.

Document Library web part showing sort, filter, and group menu

Leave a Reply

%d bloggers like this: