Method NavLink
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
NavLink(string, string, string?, string?, string?, VNode?[]?, bool, bool, bool, string?)
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
tostringNavigation target path (absolute or relative).
activeClassstringCSS-like class string appended when the link is active.
textstringLink label text.
classNamestringCSS-like utility class string applied always.
namestringElement name for query/debug.
childrenVNode[]Optional child nodes rendered inside the link.
endboolWhen true, the link is active only on an exact path match (otherwise a prefix match counts as active).
replaceboolWhen true, replaces the current history entry instead of pushing.
caseSensitiveboolWhen true, the active-state comparison is Ordinal (case-sensitive). Defaults to false.
keystringKey used to disambiguate siblings at the same position.
Returns
- ComponentNode
A ComponentNode rendering the active-aware link.