> 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

Applichi stili ai singoli componenti delle app di PowerShell Universal con il cmdlet New-UDStyle, inclusa la sovrascrittura delle classi Material UI integrate come MuiAlert.

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

## Applicazione di 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"
        }
    }
```

## Sovrascrittura degli stili integrati

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

Quando si 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é del verde predefinito.


---

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