Method NavLink
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
NavLink(string, string, string?, string?, string?, VNode?[]?, bool, bool, bool, string?, FiberEventBinding[]?, object?, RelativeRoutingType)
Adds current-location active styling to Link(string, string?, string?, string?, VNode?[]?, bool, string?, FiberEventBinding[]?, object?, RelativeRoutingType).
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, FiberEventBinding[]? events = null, object? state = null, RelativeRoutingType relative = RelativeRoutingType.Route)
Parameters
tostringAbsolute or route-relative navigation target. A relative one takes the same resolution for the active comparison that it takes to navigate.
activeClassstringAppended to
classNamewhile non-empty and active.textstringclassNamestringnamestringchildrenVNode[]endboolRestricts active state to an exact path match instead of a segment-prefix match.
replaceboolSelects replacement instead of push navigation.
caseSensitiveboolUses ordinal matching instead of the case-insensitive default.
keystringeventsFiberEventBinding[]Event bindings applied to the button, as on Link(string, string?, string?, string?, VNode?[]?, bool, string?, FiberEventBinding[]?, object?, RelativeRoutingType).
stateobjectStored on the new history entry, as on Link(string, string?, string?, string?, VNode?[]?, bool, string?, FiberEventBinding[]?, object?, RelativeRoutingType).
relativeRelativeRoutingTypeHow a relative
toresolves, as on Link(string, string?, string?, string?, VNode?[]?, bool, string?, FiberEventBinding[]?, object?, RelativeRoutingType); the active comparison resolves it the same way.