Skip to content

Feature Pinnable Topbar

teociaps edited this page Nov 27, 2025 · 2 revisions

Pinnable Topbar

Add a pin button to keep the top navigation bar fixed at the top of the page.

Why Use It?

  • Quick Access - API definitions dropdown always accessible
  • User Control - Users can pin/unpin as needed
  • Smooth Animation - Elegant pin/unpin transitions

Visual Example

pinnable topbar gif

Quick Start

Swashbuckle

using AspNetCore.Swagger.Themes;

app.UseSwaggerUI(Theme.Dark, options =>
{
    options.EnablePinnableTopbar();
});

NSwag

using AspNetCore.Swagger.Themes;

app.UseSwaggerUi(Theme.Dark, settings =>
{
    settings.EnablePinnableTopbar();
});

Customization

Style the pinned topbar:

:root {
  --topbar-pinned-background-color: #your-color;
  --topbar-pinned-shadow-color: rgba(0, 0, 0, 0.3);
  --topbar-pin-icon-color: #your-icon-color;
}

Compatibility

Works with:

Next Steps


Back to Advanced Options

Clone this wiki locally