Table of Contents

Method Navigate

Namespace
Velvet
Assembly
Velvet.Docs.dll

Navigate(string, bool, string?)

Declarative redirect element. Navigates to to via the active Router, then renders nothing. Use it for conditional redirects such as return loggedIn ? V.Outlet() : V.Navigate("/login").

public static ComponentNode Navigate(string to, bool replace = false, string? key = null)

Parameters

to string

Navigation target path (absolute or relative).

replace bool

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

key string

Key used to disambiguate siblings at the same position.

Returns

ComponentNode

A ComponentNode that performs the redirect and renders nothing.