Definition
Assembly: Mintlify.Core.dll Namespace: Mintlify.Core.Models Inheritance: System.ObjectSyntax
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
.ctor
Initializes a new instance of the PrimaryNavigationConfig class for a button.Syntax
Parameters
Name | Type | Description |
---|---|---|
label | string | The button label. |
href | string | The button href URL. |
.ctor
Initializes a new instance of the PrimaryNavigationConfig class for GitHub.Syntax
Parameters
Name | Type | Description |
---|---|---|
href | string | The GitHub URL. |
Properties
Href
Gets or sets the href URL for the navigation item.Syntax
Property Value
Type:string?
Label
Gets or sets the label text for button-type navigation items.Syntax
Property Value
Type:string?
Type
Gets or sets the type of navigation item (e.g., “button”, “github”).Syntax
Property Value
Type:string?
Methods
Button
Creates a button-type navigation configuration.Syntax
Parameters
Name | Type | Description |
---|---|---|
label | string | The button label. |
href | string | The button href URL. |
Returns
Type:Mintlify.Core.Models.PrimaryNavigationConfig
A PrimaryNavigationConfig configured as a button.
GitHub
Creates a GitHub-type navigation configuration.Syntax
Parameters
Name | Type | Description |
---|---|---|
href | string | The GitHub URL. |
Returns
Type:Mintlify.Core.Models.PrimaryNavigationConfig
A PrimaryNavigationConfig configured for GitHub.
ToString
Returns the string representation of the navigation configuration.Syntax
Returns
Type:string
The href URL or empty string.