Overview
Client Side WebParts developed using SharePoint Framework (SPFx) are the future of the modern SharePoint. Client-side WebParts are developed using modern UI standards, modern JavaScript tools, and libraries. They run inside the context of SharePoint page and are responsive in nature.
Features of SPFx Client Side Web Parts
Features of SPFx Client Side Web Parts
- Lightweight - Developed using JavaScript libraries and HTML
- Responsive - Renders on any device
- Environments - Work on both SharePoint Online and OnPremise (SharePoint 2016 onwards)
In this article, we will learn how to build a simple SPFx based Client Side WebPart. Please refer to my previous article to set up your developer environment.
Create SPFx Solution
Create SPFx Solution
- Create a directory for SPFx solution.
md firstspfx-webpart - Navigate to the above-created directory.
cd firstspfx-webpart - Run Yeoman SharePoint Generator to create the solution.
yo @microsoft/sharepoint - Yeoman generator will present you with the wizard by asking questions about the solution to be created.

- Solution Name
Hit enter to have a default name (firstspfx-webpart in this case) or type in any other name for your solution.
Selected choice - Hit enter - Target for component
Here we can select the target environment where we are planning to deploy the client webpart i.e. SharePoint Online or SharePoint OnPremise (SharePoint 2016 onwards).
Selected choice - SharePoint Online only (latest) - Place of files
We may choose to use the same folder or create a subfolder for our solution.
Selected choice - Same folder - Deployment option
Selecting Y will allow the app to deployed instantly to all sites and will be accessible everywhere.
Selected choice - N (install on each site explicitly) - Type of client-side component to create
We can choose to create client sidewebpart or an extension. Choose the webpart option.
Selected choice - WebPart - Web part name
Hit enter to select the default name or type in any other name.
Selected choice - Hit enter (default name) - Web part description
Hit enter to select the default description or type in any other value.
Selected choice - Hit enter (default description) - Framework to use
Select any JavaScript framework to develop the component. Available choices are (No JavaScript Framework, React, and Knockout)
Selected choice - No JavaScript Framework
- Solution Name
- Yeoman generator will start the scaffolding process to create the solution and will install the required dependencies. This process will take a significant amount of time.

- Once scaffolding is completed, Yeoman will show the below message.


Vijay ChavanPosted Jan 28, 2020, 6:20 PM
Good, Thanks
hariPosted Jun 5, 2019, 11:37 PM
While installing developer certificate, gulp trust-dev-cert command giving - "ReferenceError: primordials is not defined" error . can you help?
Prashant KumbharPosted Oct 7, 2018, 10:07 AM
Awesome.. clean and clear explanation
Vikas SrivastavaPosted Jul 22, 2018, 1:45 PM
Nice one keep sharing.....
Viknaraj ManogararajahPosted Jul 20, 2018, 7:02 PM
thank you for sharing
Hadshana KamalanathanPosted Jul 20, 2018, 10:37 AM
Nice one...