Custom widgets
The standard approach to extending Sitefinity CMS frontend is to write custom widgets or to override the logic of the built-in ones. The corresponding elements for widgets in ASP.NET Core are ViewComponents. Thus, widgets that are available in the Sitefinity CMS Toolbox, correspond to the ViewComponents classes in the ASP.NET Core application.
The ViewComponentsCode are useful in this scenario as they have a single method InvokeAsync that can render multiple views and can accept a range of arguments for configuration. This is similar to the existing Sitefinity ASP.NET MVC development model, where you create a Controller that has an Index action that can be invoked when the widget is rendered.
However, unlike the MVC Controllers, the ViewComponents do not have a POST action to handle POST requests.
Use the following video as a guideline for creating widgets: