DEV Community

Acmion
Acmion

Posted on • Updated on

CshtmlComponent — A Real ASP.NET Core MVC and Razor Pages Component

CshtmlComponent — A Real ASP.NET Core MVC and Razor Pages Component

Have you ever tried working with components in ASP.NET Core MVC or Razor Pages projects? This is a major pain in the ass. The solutions available by default are Tag Helpers, View Components and Razor Components. However, none of these are as customizable and convenient as the components in JavaScript frameworks (Svelte, Vue, etc.). CshtmlComponent aims to fix this.

CshtmlComponent is developed by Acmion.

CshtmlComponent Documentation

CshtmlComponent supports the following:

  • Razor syntax
  • Nested child content
  • Runtime compilation
  • MVC & Razor Pages
  • Lenient file structure
  • Named slots

Tag Helpers support the following:

  • Nested child content
  • MVC & Razor Pages
  • Lenient file structure

View Components support the following:

  • Razor syntax
  • Runtime compilation
  • MVC & Razor Pages

Razor Components support the following:

  • Razor syntax
  • Nested child content
  • Named slots

Note: While Razor Components can be used in standard MVC & Razor Pages projects without Blazor, the development experience is quite lacking.

CshtmlComponent Features

The feature set of CshtmlComponent is more complete than that of the alternatives, which has resulted in clear improvement in my development speed of ASP.NET Core projects. Hopefully, you will also find it useful!

Please check out the documentation and the GitHub repository!

CshtmlComponent Documentation

CshtmlComponent GitHub

Top comments (0)