Swagger.Bootstrap
1.0.3
See the version list below for details.
dotnet add package Swagger.Bootstrap --version 1.0.3
NuGet\Install-Package Swagger.Bootstrap -Version 1.0.3
<PackageReference Include="Swagger.Bootstrap" Version="1.0.3" />
<PackageVersion Include="Swagger.Bootstrap" Version="1.0.3" />
<PackageReference Include="Swagger.Bootstrap" />
paket add Swagger.Bootstrap --version 1.0.3
#r "nuget: Swagger.Bootstrap, 1.0.3"
#:package Swagger.Bootstrap@1.0.3
#addin nuget:?package=Swagger.Bootstrap&version=1.0.3
#tool nuget:?package=Swagger.Bootstrap&version=1.0.3
<div align="center">
</div>
Swagger.Bootstrap
Swagger.Bootstrap is an add-on for Swagger UI that gives it a modern Bootstrap look and feel.
It also adds a simple theme switcher so users can toggle between Light, Dark, Oled and System.
✨ Features
- Bootstrap-inspired styling for Swagger UI
- Built-in theme switcher (light/dark)
- Easy integration with ASP.NET Core Swagger setup
📂 Getting Started
1. NuGet package manager
Install using the NuGet package manager or by running one of the following commands.
dotnet add package Swagger.Bootstrap
Install-Package Swagger.Bootstrap
Configure Swagger.Bootstrap
In your Program.cs or Startup.cs, simply replace the default UseSwaggerUI with:
app.UseSwaggerBootstrap(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
});
2. Manual installation
Download the files
Copy the provided swagger.bootstrap.min.css and swagger.bootstrap.min.js files into your projects static file location, wwwroot.
Enable static files
Add the following, to your Program.cs or Startup.cs
app.UseStaticFiles();
Inject into Swagger UI
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
// Inject custom CSS
c.InjectStylesheet("/swagger.bootstrap.min.css");
// Inject custom JavaScript
c.InjectJavascript("/swagger.bootstrap.min.js");
});
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.AspNetCore.Components.Web (>= 8.0.19)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.0)
- Swashbuckle.AspNetCore.SwaggerUI (>= 9.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.