Table of Contents

Class PortalNode

Namespace
Velvet
Assembly
Velvet.Docs.dll

Node that renders children into a different VisualElement registered in FiberPortalRegistry, rather than at their position in the VNode tree. Used when a component's children are logically scoped to it but should be placed near the DOM root, such as modals or overlays.

public sealed class PortalNode : VNode
Inheritance
object
PortalNode
Inherited Members

Properties

Children

Array of child nodes to render at the mount target.

Layer

Framework-managed screen-space layer panel this portal's children attach to (null for a registry-target portal). One host panel exists per layer per reconciler, sorted around the app's main panel, destroyed on reconciler disposal.

TargetId

ID of the mount target registered in FiberPortalRegistry. Null when the portal targets a framework-managed layer panel instead (Layer is set) — exactly one of the two is non-null.