All pages
Powered by GitBook
1 of 1

Loading...

Icon

Icon component for Universal Apps

FontAwesome icons to include in your app. Icon names are slightly different than those shown on the FontAwesome website. For example, if you want to use the network-wired icon, you would use the following string.

Finding an Icon

We include FontAwesome v6 with PowerShell Universal. You can use Find-UDIcon to search through the list of included icons.

The UniversalDashboard.FontAwesomeIcons enum should not be used and is only included for backwards compatibility. Many of the icons are no longer a part of FontAwesome 6.

Icon

Create icons by specifying their names. You can use the icon reference below to find icons.

Size

Set the size of the icon. Valid values are: xs, sm, lg, 2x, 3x, 4x, 5x, 6x, 7x, 8x, 9x, 10x

Rotation

Rotate icons. The value represents the degrees of rotation.

Border

Add a border to your icon.

Style

Apply CSS styles to your icon.

Visually Search for Icons

Complete Icon List

API

New-UDIcon -Icon 'NetworkWired'
Find-UDIcon User
Click here to view the complete icon list.
New-UDIcon
New-UDIcon -Icon 'AddressBook'
    New-UDIcon -Icon 'AddressBook' -Size 'sm'
    New-UDIcon -Icon 'AddressBook' -Size 'lg'
    New-UDIcon -Icon 'AddressBook' -Size '5x'
    New-UDIcon -Icon 'AddressBook' -Size '10x'
New-UDIcon -Icon 'AddressBook' -Size '5x' -Rotation 90
New-UDIcon -Icon 'AddressBook' -Size '5x' -Border
New-UDIcon -Icon 'AddressBook' -Size '5x' -Style @{
    backgroundColor = "red"
}
New-UDTextbox -Id 'txtIconSearch' -Label 'Search' 
New-UDButton -Text 'Search' -OnClick {
    Sync-UDElement -Id 'icons'
}

New-UDElement -tag 'p' -Content {}

New-UDDynamic -Id 'icons' -Content {
    $IconSearch = (Get-UDElement -Id 'txtIconSearch').value
    if ($null -ne $IconSearch -and $IconSearch -ne '')
    {
        $Icons =$Icons = Find-UDIcon -Name $IconSearch
    }

    foreach($icon in $icons) {
        try{
            New-UDChip -Label $icon -Icon (New-UDIcon -Icon $icon)
        }
        catch{
            New-UDChip -Label "$icon Unknown" 
        }
    }
}