> 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

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 básicos 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, a continuación, 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"
        }
    }
```

![Tarjeta con UDStyle](/files/E57Kbg8ymp7Z5giZrRwD)

## Sobrescribir 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.

Al utilizar una alerta de éxito, 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.

![Alerta con fondo rojo](/files/9KM2e9vvGljlRdohHVOr)


---

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