> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/apps/components/data-display/icon.md). Agents can also search and read this documentation through its [MCP server](https://docs.devolutions.net/~gitbook/mcp).

# Icon

Add FontAwesome icons to PowerShell Universal apps with New-UDIcon, covering icon search, sizing, rotation, borders, and custom CSS styling options.

[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'
```

The icon name is not case-sensitive. You can use the icon label without spaces (`NetworkWired`), the FontAwesome name (`network-wired`) or one of its FontAwesome aliases. When the name does not match any included icon, a question mark icon (`circle-question`) is displayed instead.

## 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'
```

## Size

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

```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'
```

## Rotation

Rotate icons. The value represents the degrees of rotation.

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

## Border

Add a border to your icon.

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

## Style

Apply CSS styles to your icon.

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

## 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)

## Parameters

| Name       | Type           | Description                                                                                                                                                                              |
| ---------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Id         | String         | The ID of the component. Defaults to a random GUID.                                                                                                                                      |
| Icon       | String         | The FontAwesome 6 icon to display. Defaults to `User`.                                                                                                                                   |
| Children   | ScriptBlock    | Custom content to display as the icon (for example, an icon from another icon set rendered with `New-UDHtml`). Alias: `-Content`. When set, only `-Id`, `-ClassName` and `-Style` apply. |
| Size       | String         | The size of the icon. Valid values: `xs`, `sm`, `md`, `lg`, `1x`, `2x`, `3x`, `4x`, `5x`, `6x`, `7x`, `8x`, `9x`, `10x`. Defaults to `sm`.                                               |
| Color      | DashboardColor | The color of the icon, for example `red` or `#ff0000`.                                                                                                                                   |
| Solid      | Switch         | Uses the solid style of the icon. Icons that have no regular style always use the solid style, and brand icons always use the brands style.                                              |
| Rotation   | Integer        | The number of degrees to rotate the icon.                                                                                                                                                |
| Flip       | String         | Flips the icon. Valid values: `horizontal`, `vertical`, `both`.                                                                                                                          |
| Spin       | Switch         | Spins the icon.                                                                                                                                                                          |
| Beat       | Switch         | Animates the icon with a beat effect. Alias: `-Pulse`.                                                                                                                                   |
| Fade       | Switch         | Animates the icon with a fade effect.                                                                                                                                                    |
| BeatFade   | Switch         | Animates the icon with a combined beat and fade effect.                                                                                                                                  |
| Bounce     | Switch         | Animates the icon with a bounce effect.                                                                                                                                                  |
| Shake      | Switch         | Animates the icon with a shake effect.                                                                                                                                                   |
| Border     | Switch         | Adds a border around the icon.                                                                                                                                                           |
| FixedWidth | Switch         | Gives the icon a fixed width.                                                                                                                                                            |
| Inverse    | Switch         | Inverts the colors of the icon.                                                                                                                                                          |
| ListItem   | Switch         | Formats the icon to be used as a list bullet.                                                                                                                                            |
| Pull       | String         | Pulls the icon to one side. Valid values: `right`, `left`.                                                                                                                               |
| Transform  | String         | A FontAwesome transform to apply to the icon, for example `shrink-6 left-4`.                                                                                                             |
| Title      | String         | A title for the icon.                                                                                                                                                                    |
| ClassName  | String         | A CSS class to apply to the icon.                                                                                                                                                        |
| Style      | Hashtable      | CSS styles to apply to the icon.                                                                                                                                                         |

`Find-UDIcon` has one mandatory parameter, `-Name`, which accepts wildcards (`*`). Hyphens in the name are ignored, and the search returns the names of every included icon that contains the text.

## API

[**New-UDIcon**](https://docs.devolutions.net/powershell-universal/powershell-commands/new-udicon.md)

### See also

* [Devolutions Academy – Fetching user details](https://academy.devolutions.net/student/activity/3543018-part-3-fetching-user-details)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/powershell-universal/apps/components/data-display/icon.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
