New-UDElement
cmdlet allows you to create custom React elements within your dashboard. Similar to New-UDHtml
, you can define HTML elements using New-UDElement
. Unlike, New-UDHtml
, you can update elements, set auto refresh and take advantage of the React component system.-Tag
and -Content
when creating an element. The below example creates a div tag.-Attributes
parameter. This parameter accepts a hashtable of attribute name and values. The below example creates red text.-AutoRefresh
, -RefreshInterval
and -Endpoint
parameters to create an element the refreshes on a certain interval. The below example creates an element that refreshes every second and displays the current time.Set-UDElement
cmdlet to set element properties and content dynamically. The following example sets the content of the element to the current time.-Properties
parameter of Set-UDElement
. The following example sets the current time and changes the color to red.Add-UDElement
. The following example adds child list items to an unordered list.Clear-UDElement
. The following example clears all the list items from an unordered list.Sync-UDElement
. The following example causes the div to reload with the current date.Remove-UDElement
.