Microsoft has introduced a new development model in SharePoint i.e SharePoint Framework. By using this framework, we can do client-side development and easy integration with SharePoint data in both, On Premises as well as Office 365.

In this article, we will see a step by step process of how to create our first web part.

Before creating a web part, we need to run some commands to create a project in SharePoint Framework. You can use command prompt (cmd) or Windows PowerShell. Here, I am using PowerShell to create project.

  1. Open PowerShell.

    SharePoint

  1. Create a folder under SharePoint called SharePointFramework or you can create your own folder.

  1. To create a SharePoint Framework project, run theYeoman Generator. Yeoman is an open source client development tool. Enter the below command to create a project.

  1. Provide the below details when prompted.

  1. If you want to open the Solution in Visaul Studio Code, use the below command to open.

    Code

    SharePoint

  1. Add your web part FirstSPClientWebpart to the page like below.

    SharePoint

  1. Once you add, you can see your web part on the page. Here, you can edit or delete the web part. Use options like Mobile View, Tablet View and Preview of the page.

    SharePoint

Now, try to build your own first web part using the new SharePoint Framework. If you find any difficulties, please let me know.