Alert
Alert component for Universal Dashboard.
Alerts provide a simple way to communicate information to a user.

Simple Alerts

Alerts have four different severities and can include text or other content.
1
New-UDAlert -Severity 'error' -Text 'This is an error alert — check it out!'
2
New-UDAlert -Severity 'warning' -Text 'This is an warning alert — check it out!'
3
New-UDAlert -Severity 'info' -Text 'This is an error info — check it out!'
4
New-UDAlert -Severity 'success' -Text 'This is an success alert — check it out!'
Copied!
Alert Types

Advanced Alerts

Alerts can contain any component and also a title.
1
New-UDAlert -Severity 'error' -Content { New-UDHtml 'This is an error alert — <strong>check it out!</strong>' } -Title "Error"
2
New-UDAlert -Severity 'warning' -Content { New-UDHtml 'This is an warning alert — <strong>check it out!</strong>' } -Title "Warning"
3
New-UDAlert -Severity 'info' -Content { New-UDHtml 'This is an error info — <strong>check it out!</strong>' } -Title "Info"
4
New-UDAlert -Severity 'success' -Content { New-UDHtml 'This is an success alert — <strong>check it out!</strong>' } -Title "Success"
Copied!
Advanced Alerts

API

New-UDAlert
Name
Type
Description
Required
Id
string
The ID of this component.
False
Severity
string
The type of alert to display.
False
Content
ScriptBlock
Custom alert content to display.
False
Text
string
Text to display within the alert.
False
Title
string
The title of the alert.
False
Last modified 4mo ago