Build reusable Razor partial views and Bootstrap 5 UI components for TCT English
Use when building reusable UI components: modals, toasts, cards, loading skeletons, empty states, or any shared Razor partials.
_Layout.cshtml)bi-* classes)Views/Shared/_<ComponentName>.cshtml ← Shared partials
Views/<Feature>/_<Partial>.cshtml ← Feature-specific
wwwroot/css/<feature>.css ← Feature CSS
wwwroot/js/<feature>.js ← Feature JS
function showToast(type, message, duration = 3000) {
// Bootstrap Toast component, auto-dismiss
// Types: success (bg-success), error (bg-danger), warning, info
}
<!-- Bootstrap modal with form action, anti-forgery token -->
function showDeleteModal(itemName, deleteUrl) { ... }
.skeleton-line {
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
animation: shimmer 1.5s infinite;
}
<div class="text-center py-5 text-muted">
<i class="bi bi-inbox fs-1"></i>
<h5>@title</h5>
<p>@message</p>
</div>
asp-validation-for under each input