Property TargetElement
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
TargetElement
The container this portal's children attach to, held by the caller rather than published under a name. Null when the portal targets a registered id or a layer panel.
public VisualElement? TargetElement { get; init; }
Property Value
- VisualElement
Remarks
Changing it across renders moves the children: the reconciler cannot patch one container's
portal into another's, so the old one unmounts and the new one mounts. That is what
createPortal does when its container changes, and it is where this differs from a
registry target, whose id is resolved once at mount and then held.