DEV Community

Acmion
Acmion

Posted on • Edited on

6 2

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

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay