

There is also an option to Show (default) or Hide the command bar, in case you would prefer users not be able to manage the files or views.Īs you might expect, the File Viewer Web Part allows you to display a file on the page. In addition, there are four Size options: Autosize, to size the web part to display all items in the library, or Small (5 items), Medium (15 items), or Large (30 items). You can also choose to display only a specific folder in this web part instance. If the selected library has multiple Views created within SharePoint, then in the web part’s edit pane you can select one of those views to display by default in this web part instance. However, there are some command bar actions which are not (as of this writing) supported in the Document Library Web Part: flows, alerts, share/link, copy/move, version history, and check out/in. This gives a fairly robust experience on the page. And when a file is selected, users can download, rename, or delete the file, or pin it to the top. Users with the appropriate permissions can also create and upload files in the library from within the web part, sync files, and export to Excel. A user can also click on the See All link within the web part, to open the underlying library, though be aware that it opens on the same tab unless the user right-clicks and chooses to open in a new tab. Note that any settings you change within the web part do not affect the underlying library views and do not persist when your page reloads, unless you save the changes. Users can also switch to a Compact List or to a Tiles display. People can use the column headers to sort, group, and filter files as they would within the library itself. In the resulting web part display, any column formatting or folders will be displayed as they are within the library. The web part will display the name of the document library at the top, but you as the page designer can name the web part whatever you choose by typing into the title area. The Document library web part allows you to select a single library within the current SharePoint site, from which to display contents.

These two web parts, either alone or in combination, give people visibility into files stored within SharePoint libraries.

In this third article of our series on Modern SharePoint Web Parts, we’re covering the Document Library and File Viewer web parts.
