Table of Contents

Method NavLink

Namespace
Velvet
Assembly
Velvet.Docs.dll

Clickable navigation primitive that derives an active state from the current location. Applies activeClass when the link is active.

public static ComponentNode NavLink(string to, string activeClass, string? text = null, string? className = null, string? name = null, VNode?[]? children = null, bool end = false, bool replace = false, bool caseSensitive = false, string? key = null)

Parameters

to string

Navigation target path (absolute or relative).

activeClass string

CSS-like class string appended when the link is active.

text string

Link label text.

className string

CSS-like utility class string applied always.

name string

Element name for query/debug.

children VNode[]

Optional child nodes rendered inside the link.

end bool

When true, the link is active only on an exact path match (otherwise a prefix match counts as active).

replace bool

When true, replaces the current history entry instead of pushing.

caseSensitive bool

When true, the active-state comparison is Ordinal (case-sensitive). Defaults to false.

key string

Key used to disambiguate siblings at the same position.

Returns

ComponentNode

A ComponentNode rendering the active-aware link.