Hi @Sanjay Adsure,
For content-based search matching the OOTB experience:
Use PnP Modern Search if you need a balance of customization and effort.
Use OOTB Search Results Web Part if minor UI differences are acceptable.
For metadata-only filtering, use the query string method with the library web part.
- Install the PnP Modern Search solution.
- Add the Search Box web part to your custom page.
- Add the Search Results web part and configure it:
- Under Query, use
{searchTerms} Path:"https://yourtenant.sharepoint.com/sites/yoursite/YourLibrary"
. - Customize the results template to match your library’s columns.
- Under Query, use
- Connect the Search Box to the Search Results web part via dynamic data connections
Modern SharePoint library pages (like AllItems.aspx
) are not editable. You cannot add custom web parts to them. Instead, create a new page and use the above approaches.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.