> 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/it/app/themes/styles.md).

# Stili

È possibile applicare stili ai singoli componenti all'interno delle app utilizzando il componente `UDStyle`. Questo componente dovrà essere aggiunto alla dashboard ed è parte dei componenti principali inclusi con PowerShell Universal.

## Applicare uno stile

Per applicare uno stile a un componente o a un insieme di componenti, richiami il cmdlet `New-UDStyle`, specifichi uno stile CSS e includa i componenti a cui desidera applicare lo stile all'interno del blocco di script `-Content`.

```powershell
New-UDStyle -Style '
    padding: 32px;
    background-color: hotpink;
    font-size: 24px;
    border-radius: 4px;
    &:hover {
      color: white;
    }
    .MuiCardHeader-root {
        background-color: green !important;   
    }
    .MuiCardContent-root {
        background-color: green !important;   
    }' -Content {
        New-UDCard -Title 'Test' -Content {
            "Hello"
        }
    }
```

![UDStyled card](/files/NVQUU6zCsjJAfaNBEmqH)

## Override degli stili integrati

Ogni componente Material UI dispone di un insieme di classi integrate che è possibile sovrascrivere utilizzando `New-UDStyle`. Per determinare i nomi delle classi da sovrascrivere, può consultare la documentazione API del componente che sta tentando di modificare sul sito di Material UI. Ad esempio, qui è riportato un elenco dei [nomi delle classi](https://material-ui.com/api/alert/#css) CSS del componente Alert.

Quando utilizza un avviso di tipo success, al componente verrà applicata la classe `.MuiAlert-standardSuccess`. È possibile sovrascrivere questo stile predefinito in questo modo.

```powershell
New-UDStyle -Style '.MuiAlert-standardSuccess { background-color: red !important;  }  ' -Content {
    New-UDAlert -Text "Hello"
}
```

L'avviso risultante sarà rosso anziché verde predefinito.

![Alert with Red Background](/files/LdiXtrpdkcq5vwPGpfS3)


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/it/app/themes/styles.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
