How can I help you?
Add Syncfusion® Blazor component in the Blazor application
18 Apr 20262 minutes to read
The Syncfusion® Blazor extension for Visual Studio Code speeds up component insertion by providing ready-to-use Razor markup and placeholders for common features.
NOTE
The Syncfusion® Blazor code snippet feature is available from Essential Studio® 2021 Volume 1 (
v19.1.0.54).
Quick start
- Open your Blazor project in Visual Studio Code and the target Razor file.
- Position the cursor where you want the component markup inserted.
-
Type the
sfprefix using the convention:sf<Syncfusion component name>-<feature> Example: sfgrid-grouping -
Choose the snippet from the suggestions and press Enter or Tab. The component markup is inserted with editable placeholders.

-
Use Tab to navigate placeholders and fill required values. Inline comments in the snippet highlight required fields.

-
Each snippet includes a help link at the top so you can quickly access the relevant documentation for the inserted component or feature.

After inserting a snippet — project configuration checklist
The snippet only adds Razor markup. To render Syncfusion® components correctly, ensure the project is configured as follows:
-
Add the required Syncfusion® NuGet package(s) (individual packages are recommended).Refer to this section to learn about the advantages of the individual NuGet packages.

-
Import Syncfusion® namespaces in
~/_Imports.razor.
-
Include a Syncfusion® theme stylesheet in the page head:
~/Components/App.razor(Blazor Web App),~/Pages/_Host.cshtml(Blazor Server), or~/wwwroot/index.html(Blazor WebAssembly).
-
Register the Syncfusion® Blazor service in the appropriate
Program.csfiles. For interactive Web App render modesWebAssemblyorAuto, register in bothProgram.csfiles when applicable.
- If you installed the trial setup or NuGet packages from nuget.org you must register the Syncfusion® license key to your application since Syncfusion® introduced the licensing system from 2018 Volume 2 (v16.2.0.41) Essential Studio® release. Navigate to the help topic to generate and register the Syncfusion® license key to your application. Refer to this UG topic for understanding the licensing details in Essential Studio® for Blazor.