> 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/de/apps/themes/styles.md).

# Stile

Gestalten Sie einzelne PowerShell Universal-App-Komponenten mit dem Cmdlet New-UDStyle, einschließlich des Überschreibens integrierter Material UI-Klassen wie MuiAlert.

Sie können Stile auf einzelne Komponenten innerhalb von Apps anwenden, indem Sie die Komponente `UDStyle` verwenden. Diese Komponente muss zu Ihrem Dashboard hinzugefügt werden und ist Teil der Kernkomponenten, die in PowerShell Universal enthalten sind.

## Anwenden eines Stils

Um einen Stil auf eine Komponente oder eine Reihe von Komponenten anzuwenden, rufen Sie das Cmdlet `New-UDStyle` auf, geben einen CSS-Stil an und schließen dann die Komponenten, die Sie gestalten möchten, in den Skriptblock `-Content` ein.

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

## Überschreiben integrierter Stile

Jede Material UI-Komponente verfügt über eine Reihe integrierter Klassen, die Sie mit `New-UDStyle` überschreiben können. Um die Klassennamen zu ermitteln, die Sie überschreiben müssen, können Sie die API-Dokumentation für die Komponente, die Sie ändern möchten, auf der Material UI-Website einsehen. Hier ist zum Beispiel eine Auflistung der CSS-[Klassennamen](https://material-ui.com/api/alert/#css) der Alert-Komponente.

Wenn Sie eine Erfolgsmeldung verwenden, wird die Klasse `.MuiAlert-standardSuccess` auf Ihre Komponente angewendet. Sie können diesen Standardstil wie folgt überschreiben.

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

Die resultierende Meldung wird rot anstatt des standardmäßigen Grün sein.


---

# 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/de/apps/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.
