Working with Bootstrap tag helpers
Bootstrap is one of the most popular UI (HTML/CSS/JS) libraries in the world, and it is the fundamental UI framework that's used by all the ABP themes. As a benefit of using such a library as a standard library, we can build our UI pages and components based on Bootstrap and let the theme style them. In this way, our modules and even applications can be theme-independent and work with any ABP-compatible UI theme.
Bootstrap is a well-documented and easy-to-use library. However, there are two problems while writing Bootstrap-based UI code:
- Some components require a lot of boilerplate code. Most parts of these codes are repetitive and tedious to write and maintain.
- Writing plain Bootstrap code in an MVC/Razor Pages web application is not very type-safe. We can make mistakes in class names and HTML structure that we can't catch at compile time.
ASP.NET Core MVC/Razor Pages has a tag helper system to define reusable components...