# Icon

[FontAwesome ](https://fontawesome.com/?from=io)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.

```powershell
New-UDIcon -Icon 'NetworkWired'
```

## Finding an Icon

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

```powershell
Find-UDIcon User
```

{% hint style="warning" %}
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.
{% endhint %}

## Icon

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

```powershell
New-UDIcon -Icon 'AddressBook'
```

![](https://1373299915-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8F6PrkNTG8Y34hADzKOL%2Fuploads%2Fgit-blob-7b36552f26e4ec736e9cc06f256630e23ee6762f%2Fimage%20\(173\).png?alt=media)

## Size

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

```powershell
    New-UDIcon -Icon 'AddressBook' -Size 'sm'
    New-UDIcon -Icon 'AddressBook' -Size 'lg'
    New-UDIcon -Icon 'AddressBook' -Size '5x'
    New-UDIcon -Icon 'AddressBook' -Size '10x'
```

![](https://1373299915-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8F6PrkNTG8Y34hADzKOL%2Fuploads%2Fgit-blob-966d88081ecd94ce03c7d4b1b99ab35168b7a87e%2Fimage%20\(525\).png?alt=media)

## Rotation

Rotate icons. The value represents the degrees of rotation.

```powershell
New-UDIcon -Icon 'AddressBook' -Size '5x' -Rotation 90
```

![](https://1373299915-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8F6PrkNTG8Y34hADzKOL%2Fuploads%2Fgit-blob-3a145ede911264bebc1d819f7ac41f53f5157fd9%2Fimage%20\(191\).png?alt=media)

## Border

Add a border to your icon.

```powershell
New-UDIcon -Icon 'AddressBook' -Size '5x' -Border
```

![](https://1373299915-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8F6PrkNTG8Y34hADzKOL%2Fuploads%2Fgit-blob-162378029000546adb3ef9652fe822ee1f858025%2Fimage%20\(201\).png?alt=media)

## Style

Apply CSS styles to your icon.

```powershell
New-UDIcon -Icon 'AddressBook' -Size '5x' -Style @{
    backgroundColor = "red"
}
```

![](https://1373299915-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8F6PrkNTG8Y34hADzKOL%2Fuploads%2Fgit-blob-3e9aaa4e916cd315f6a00a1369f04397ec1628dd%2Fimage%20\(482\).png?alt=media)

## Visually Search for Icons

```powershell
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" 
        }
    }
}
```

## Complete Icon List

[Click here to view the complete icon list.](https://gist.github.com/adamdriscoll/8a5d12b0ac5641bc1083bebf921f56fe)

## API

[**New-UDIcon**](https://github.com/ironmansoftware/universal-docs/blob/v5/cmdlets/New-UDIcon.txt)
