> 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/es/aplicaciones/themes/styles.md).

# Estilos

Aplique estilos a componentes individuales de aplicaciones de PowerShell Universal con el cmdlet New-UDStyle, incluida la sobrescritura de clases integradas de Material UI como MuiAlert.

Puede aplicar estilos a componentes individuales dentro de las aplicaciones mediante el componente `UDStyle`. Este componente deberá añadirse a su panel y forma parte de los componentes principales incluidos con PowerShell Universal.

## Aplicar un estilo

Para aplicar un estilo a un componente o a un conjunto de componentes, llame al cmdlet `New-UDStyle`, especifique un estilo CSS y luego incluya los componentes a los que desea aplicar el estilo dentro del bloque de 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"
        }
    }
```

## Sobrescribir los estilos integrados

Cada componente de Material UI tiene un conjunto de clases integradas que puede sobrescribir mediante `New-UDStyle`. Para determinar los nombres de clase que necesita sobrescribir, puede consultar la documentación de la API del componente que intenta modificar en el sitio de Material UI. Por ejemplo, aquí tiene un listado de los [nombres de clase](https://material-ui.com/api/alert/#css) CSS del componente Alert.

Cuando utiliza una alerta de tipo success, se aplicará la clase `.MuiAlert-standardSuccess` a su componente. Puede sobrescribir este estilo predeterminado de la siguiente manera.

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

La alerta resultante será roja en lugar del verde predeterminado.


---

# 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/es/aplicaciones/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.
