Skip to content

Advanced Options

teociaps edited this page Nov 27, 2025 · 8 revisions

Enhance your Swagger UI with powerful interactive features that improve navigation and user experience. The library provides several advanced features to enhance the Swagger UI experience.

Feature Description
Dynamic Theme Switcher 🔥 Enables runtime theme switching with auto-discovery and remembers user selection.
Sticky Operations Keeps the operation summary (GET, POST, etc.) sticky at the top of the screen while scrolling through long parameter lists or responses.
Pinnable Topbar Allows the top navigation bar to be pinned so it stays visible while scrolling.
Back To Top Adds a button to quickly scroll back to the top of the page.
Expand/Collapse All Adds buttons to expand or collapse all operations at once.

Please refer to the individual pages for detailed configuration and usage instructions.

Quick Start

Enable All Features

Enable all advanced features with a single method:

app.UseSwaggerUI(Theme.Dark, options =>
{
    // Enable all advanced options including theme switcher
    options.EnableAllAdvancedOptions();
});

Enable Individually

Or enable specific features as needed:

app.UseSwaggerUI(Theme.Dark, options =>
{
    // Enable only the features you want
    options.EnableThemeSwitcher();
    options.EnableStickyOperations();
    options.EnablePinnableTopbar();
    options.ShowBackToTopButton();
    options.EnableExpandOrCollapseAllOperations();
});

← Back to Features Overview

Clone this wiki locally