Definition

Assembly: Mintlify.Core.dll Namespace: Mintlify.Core.Models Inheritance: System.Object

Syntax

Mintlify.Core.Models.PrimaryNavigationConfig

Summary

Represents the primary navigation configuration for Mintlify navbar. Can be a button configuration or a GitHub configuration.

Constructors

.ctor

Initializes a new instance of the PrimaryNavigationConfig class.

Syntax

public PrimaryNavigationConfig()

.ctor

Initializes a new instance of the PrimaryNavigationConfig class for a button.

Syntax

public PrimaryNavigationConfig(string label, string href)

Parameters

NameTypeDescription
labelstringThe button label.
hrefstringThe button href URL.

.ctor

Initializes a new instance of the PrimaryNavigationConfig class for GitHub.

Syntax

public PrimaryNavigationConfig(string href)

Parameters

NameTypeDescription
hrefstringThe GitHub URL.

Properties

Href

Gets or sets the href URL for the navigation item.

Syntax

public string Href { get; set; }

Property Value

Type: string?

Label

Gets or sets the label text for button-type navigation items.

Syntax

public string Label { get; set; }

Property Value

Type: string?

Type

Gets or sets the type of navigation item (e.g., “button”, “github”).

Syntax

public string Type { get; set; }

Property Value

Type: string?

Methods

Button

Creates a button-type navigation configuration.

Syntax

public static Mintlify.Core.Models.PrimaryNavigationConfig Button(string label, string href)

Parameters

NameTypeDescription
labelstringThe button label.
hrefstringThe button href URL.

Returns

Type: Mintlify.Core.Models.PrimaryNavigationConfig A PrimaryNavigationConfig configured as a button.

GitHub

Creates a GitHub-type navigation configuration.

Syntax

public static Mintlify.Core.Models.PrimaryNavigationConfig GitHub(string href)

Parameters

NameTypeDescription
hrefstringThe GitHub URL.

Returns

Type: Mintlify.Core.Models.PrimaryNavigationConfig A PrimaryNavigationConfig configured for GitHub.

ToString

Returns the string representation of the navigation configuration.

Syntax

public override string ToString()

Returns

Type: string The href URL or empty string.