Getting Started — BootstrapBuilder

From zero to Bootstrap UI components in minutes.

1. Install the NuGet Package

Install DMBBootstrapBuilder alongside DMBPageBuilder . BootstrapBuilder depends on PageBuilder for its rendering lifecycle.

Install DMBBootstrapBuilder
dotnet add package DMBBootstrapBuilder

2. Configure Services

Load PageBuilder first, then BootstrapBuilder. Both register services into the DI container before the application is built.

Program.cs
using DMBPageBuilder;
using DMBBootstrapBuilder;

PageBuilderConfiguration.LoadCommonConfig(builder);
BootstrapBuilderConfiguration.LoadCommonConfig(builder);

builder.Services.AddControllersWithViews();

3. Add Razor Imports

In your _ViewImports.cshtml , add the namespaces to make builders and helpers available in every view.

_ViewImports.cshtml
@using DMBPageBuilder
@using DMBBootstrapBuilder

4. Render a First Component

Start with a simple action button. Once this renders correctly, explore layout builders, navigation and the application shell.

First BootstrapBuilder component
@Html.Button(
    ActionItemFactory.AspRoute("Documentation", "Documentation", "Index",
        IconStruct.Bootstrap("bi-journal-text"))
        .SetVariant(VariantStyle.Primary)
).Render()
Common Builders
Html.Button(...)
Html.CardBuilder()
Html.AlertBuilder()
Html.NavBarBuilder()
Html.ModalBuilder()

Understand how BootstrapBuilder layers on top of PageBuilder?

Check out the architecture guide to understand how BootstrapBuilder is structured and integrates with the rendering lifecycle.

Architecture