In this SharePoint Online tutorial, we will discuss on SharePoint Document Library web part. We will see how to add and use the document library web part in SharePoint Online.
We will also learn about Dynamic filtering in the SharePoint Document Library web part with a few examples based on a SharePoint Online environment.
We will cover:
- How to add Document Library web part in SharePoint online
- Modern SharePoint document library web part remove see all
- SharePoint Online document library web part column width
- SharePoint document library web part from another site
- Dynamic Filtering in SharePoint modern Document Library web part
- SharePoint Online document library web part breadcrumb
- How to Set Document Library web part to Specific folder.
- Document Library tree view web part in SharePoint online
- SharePoint multiple document library web part
- SharePoint document library web part 30 items
- SharePoint Online document library web part navigation
In the same way, we can also use the document library web part in SharePoint 2019 or the SharePoint subscription edition.
SharePoint Document Library web part
- The SharePoint Document library web part allows us to select a single document library inside a SharePoint site page.
- Users with proper permissions can edit, view, and add files straight from the document library web part itself.
- By default, it will choose the document library name as a title for the document library web part. If we want to change the title, we can edit the document library web part and change the title in the title area.
- Users can able to view, filter, sort, and also pin a document library, by selecting the See all options users can view the document library.
Read How to use People web part in SharePoint Online
How to add Document Library web part in SharePoint online
Let us see how we can add the document library web part to the modern SharePoint Online site,
- Open the SharePoint site to add document library web parts to the SharePoint modern site page.
- Select Edit Page in the modern SharePoint site page.
- Add a new Section layout by clicking on the + circled icon.
- In the search box, enter the document library and select a document library web part.
- After adding the Document Library Web Part, it automatically displays the document libraries that are available on the current SharePoint site as shown below:
- Select a document library directly or from a drop-down, which you want to display on your SharePoint site page. Click on the Apply button.
- Under View, you can select the view from a drop-down as All Documents.
Here, We can provide the particular folder name as well as the Size of the web part. I have given the Size as Autosize – fit to a number of items.
Apart from this, We can choose the below options:
- Small – about 5 items
- Medium – about 15 items
- Large – about 30 items
- Select Republish to commit your changes.
This is how we can add and edit the document library web part in modern SharePoint.
Read Power Automate Create Document Library
Modern SharePoint document library web part remove see all
Let us see how to remove see all options in the SharePoint Online document library web part,
- Edit the SharePoint site page and edit a document library web part section.
- In the property pane of the document library web part at the right, Enable the Show “See all” toggle control.
- Click Apply to commit the changes. Select Republish.
Now you cannot see the “see all” option in a document library web part, which is removed.
This is how to remove see all options in the modern SharePoint document library web part.
Read How to hide document library in SharePoint Online
SharePoint Online document library web part column width
Let us see how to increase the document library web part column width in modern SharePoint,
We can increase the column width of the document library and display it in a document library web part of the SharePoint modern page, To achieve this, follow the below steps:
- Select Site contents from the SharePoint page, and open the document library to be modified.
- Expand the column width, using the mouse.
- Select the Save View as an option to save the current view.
- Click the Save button.
- Refresh the SharePoint online site page, and now we can see the SharePoint modern document library web part column width has been increased as shown below;
This is how to increase the SharePoint document library web part column width.
Read How to get documents from the document library in SharePoint using Rest API
SharePoint document library web part from another site
- No, directly we cannot display the document library in a document library web part from another site on a modern SharePoint page.
- But there is an alternative way that we can do it, using the “Highlighted Content” web part we can display files from another site.
- We can specify how many documents to show in the Highlighted content web part. There is a number limit to display documents, we can show up to 500.
- If there are no documents to display, we also have an option to hide the highlighted web part.
- Sort options that are available are Most recent, Most viewed, Trending, and ascending or descending by a Managed property.
Read Difference between SharePoint list and Document library
Dynamic Filtering in SharePoint modern Document Library web part
Let us see how to work with dynamic filter in document library web part modern SharePoint,
- With dynamic filtering, you can filter one document based on a selection made in another web part.
- Select and edit the Document web part to apply a dynamic filter.
- In the property pane of the Document web part at the right, slide the toggle control to the On position under the Dynamic filtering option.
- Choose the column that we want to filter from the SharePoint list in the Column field to filter the documents.
- Under the List or Library containing filter value, select the document you added to your SharePoint site page.
- Select the column that has the values you want to filter by under the Column containing the filter value.
In this SharePoint online dynamic filtering document library web part example, we can filter one document and display it in the file viewer web part based on a selection made in a document library web part.
- Now, edit the SharePoint site page and Select a two-column section to add the Document library web part, as well as the file viewer web part.
- Now we can select a document library to add it to the web part, we will also see how to join the file viewer to the Source document.
- Now we can see the Documents added to the document web part as shown below: To Merge the source document with the file viewer web part follow the below steps:
- Edit the File viewer web part section, Select an ellipses (…) in the property pane, then select Connect to the source option.
- We select the Source list in the file viewer web part from a dropdown. You can view that This web part is connected to the selected list, here are the Documents (highlighted in Red).
- Once connected the Document library web part and file viewer web part look as shown below:
- Select Republish to commit your changes.
See the Output below:
- When we select any documents from the SharePoint document library web part, it displays the selected document in the file viewer web part.
- We can also see the selected SharePoint documents items in a document library web part breadcrumbs, as shown below:
This is how to work with dynamic filter in a document library web part modern SharePoint.
Read How to sort folders in the SharePoint document library
SharePoint Online document library web part breadcrumb
Yes, it is possible to display the document library web part breadcrumb on the modern SharePoint published page.
- When we select any documents from the SharePoint documents library in a document library web part.
- We can use breadcrumbs to navigate back to the SharePoint document library web part.
- The selected SharePoint documents items from the document library web part will be shown in a document library web part breadcrumbs, as shown below:
This is how we can display the SharePoint document library web part breadcrumb.
Read SharePoint Online image column
How to Set Document Library web part to Specific folder
Let us see how we can set or open the Document Library web part to a specific folder in modern SharePoint.
- In the modern SharePoint Document Library web part, it is possible to display the folder as well as the subfolder.
- To display the nested folders in a document library web part, we have to type the path separated by ‘/’.
Follow the below steps to set the Document Library web part to a specific folder:
- Edit the Document Library web part, in the property pane of the Document web part at the right you can see the Folder option.
- Under the Folder option, we can specify the particular folder name that we want to display in the SharePoint document web part.
- Select Apply and Republish the page to save your changes.
In the below screenshot, we can see folders and subfolders in the SharePoint document library web part breadcrumb.
- Documents -> SharePoint Document Library
- General -> Main Folder
- Test Folder -> Sub Folder
- Sample Text -> Sub Sub Folder
Now in this example, we will try to display the Sample Text folder in the modern SharePoint document library web part.
Now we can see the expected output as shown below:
- To display the nested folders in a document library web part, we have to type the path separated by ‘/’.
- There should not be any empty space while specifying a folder path.
- We have to specify the correct folder path, else it displays This path is not valid as shown below:
This is how we can Set or open the Document Library web part to a Specific folder in SharePoint online.
Read How to create a calculated column in SharePoint List or Library
Document Library tree view web part in SharePoint online
- Currently, there is no direct way or settings to inject the document library tree view web part in the SharePoint Online modern experience.
- Using SharePoint Framework (SPFX) to inject tree view in a Document Library web part in modern SharePoint. [Follow]
SharePoint multiple document library web part
- Yes, it is possible to display multiple document libraries’ web parts in the same SharePoint online site page.
- We can add multiple document library web parts to our SharePoint modern site page.
- Using the Document Library web part multiple times we can choose a library that we want to display.
- We can also select every library that we want to show in a document library web part.
Read Get all lists and document libraries programmatically using CSOM in SharePoint Online
SharePoint document library web part 30 items
- In a document library web part, by default, it will display the first 30 items when we select Autosize -fit to a number of items.
- But when we click See All in a Document Library web part, it reloads the items and displays all the items available in a document library.
- For example, if we have 150 items in a document library and added with the document library web part in a modern SharePoint site page.
- Then initially it will display only 30 items and when we select the See all option at the right of the document library web part, we can view all the items available in a document library web part.
SharePoint Online document library web part navigation
- In the modern SharePoint document library web part, when a user clicks on the folder it opens and shows the documents inside.
- In the same way, the user can go back to the parent folder with clickable breadcrumbs.
- Using breadcrumbs, users can easily navigate to the parent folders, subfolders, or nested folders in the Modern SharePoint Document library web part.
Related SharePoint tutorials:
- Freeze Header Row in List View or Library on Scrolling using jQuery in SharePoint
- How to use the SharePoint Alert Me feature in list or library
- Create a SharePoint page template
- SharePoint Online Organization Chart Web Part
- How to change the SharePoint site from private to public
In this SharePoint tutorial, we learned the SharePoint Online Document Library web part, and how to add the document library web part to the SharePoint Online modern site page. And also covered below topics:
- How to add Document Library web part in SharePoint online
- Modern SharePoint document library web part remove see all
- SharePoint Online document library web part column width
- SharePoint document library web part from another site
- Dynamic Filtering in SharePoint modern Document Library web part
- SharePoint Online document library web part breadcrumb
- How to Set Document Library web part to Specific folder.
- Document Library tree view web part in SharePoint online
- SharePoint multiple document library web part
- SharePoint document library web part 30 items
- SharePoint Online document library web part navigation
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.