Introduction
This is a list view comman set developed using SharePoint Framework extension. It will help the users to view the supported document preview in a side panel without navigating to the new tab or window. There will be a new button on the list menu named ‘Smart View‘ to view the preview of the images, documents etc.
Features
- Videos with .mp4 format is supported
- Images with the following extensions are supported
- png
- jpg
- jpeg
- gif
- Document with the following extensions are supported
- doc
- docx
- xls
- xlsx
- ppt
- pptx
- csv
- pdf – based on the browser compatibility
- Other document types with the following extensions are also supported
- js
- txt
- css
Preview

Source Code
The above web-part is shared with the community and is of free to use. Please click the below link to download the code and have fun.
https://github.com/pnp/sp-dev-fx-extensions/tree/master/samples/react-command-document-preview
Happy Coding…
How to load the document dynamically in this component?
LikeLike
Hi, this is a SPFx extension, when you select the document in a library, the command button is visible on the toolbar and you can click to see the preview. Load document dynamically, I don’t actually understand what you are trying to achieve. Please give me some more information.
LikeLike