> 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/comandos-de-powershell/new-udiconbutton.md).

# New-UDIconButton

### Sinopsis

Crea un botón con un icono.

### Sintaxis

```powershell
New-UDIconButton [[-Id] <String>] [[-Icon] <Object>] [[-OnClick] <Endpoint>] [-Disabled] [[-Href] <String>] [[-Style] <Hashtable>] [[-ClassName] <String>] [[-Size] <String>] [[-Variant] <String>] [-ShowLoading] [[-LoadingComponent] <ScriptBlock>] [<CommonParameters>]
```

### Descripción

Crea un botón con un icono.

### Parámetros

#### -Id

El ID del componente. Su valor predeterminado es un GUID aleatorio.

```
Required?                    false
Position?                    1
Default value                ([Guid]::NewGuid()).ToString()
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Icon El icono que se mostrará dentro del botón.Required?                    falsePosition?                    2Default value                UserAccept pipeline input?       falseAliasesAccept wildcard characters?  false-OnClickUn bloque de script que se ejecutará al hacer clic en el botón.Required?                    falsePosition?                    3Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false    -Disabled \[\<SwitchParameter>]        Whether the button is disabled.Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false-HrefUn enlace al que navegar cuando se hace clic en el botón.Required?                    falsePosition?                    4Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-StyleEl estilo CSS que se aplicará al icono.Required?                    falsePosition?                    5Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-ClassNameUna clase CSS que se aplicará al icono.Required?                    falsePosition?                    6Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-SizeEl tamaño del botón de icono. Los valores válidos son: "small", "medium", "large"Required?                    falsePosition?                    7Default value                mediumAccept pipeline input?       falseAliasesAccept wildcard characters?  false-VariantRequired?                    falsePosition?                    8Default value                textAccept pipeline input?       falseAliasesAccept wildcard characters?  false    -ShowLoading \[\<SwitchParameter>]Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false-LoadingComponentRequired?                    falsePosition?                    9Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false    \<CommonParameters>        This cmdlet supports the common parameters: Verbose, Debug,        ErrorAction, ErrorVariable, WarningAction, WarningVariable,        OutBuffer, PipelineVariable, and OutVariable. For more information, see        about\_CommonParameters (<https://go.microsoft.com/fwlink/?LinkID=113216).Salidas--------------------------> EJEMPLO 1 --------------------------PS >New-UDIconButton -Icon (New-UDIcon -Icon user -Size sm)  -Id 'iconButton1'Basic Icon Button|Creates a basic icon button.-------------------------- EXAMPLE 2 --------------------------PS >New-UDIconButton -Icon (New-UDIcon -Icon user -Size sm) -OnClick {PS >    Show-UDToast -Message 'Icon Button Clicked'PS > } -Id 'iconButton2'Icon Button with OnClick|Creates an icon button with an OnClick script block.-------------------------- EXAMPLE 3 --------------------------PS >New-UDIconButton -Icon (New-UDIcon -Icon user -Size sm) -Href '<https://www.google.com>' -Id 'iconButton3'Icon Button with Href|Creates an icon button that navigates to a URL.-------------------------- EXAMPLE 4 --------------------------PS >New-UDIconButton -Icon (New-UDIcon -Icon user -Size sm) -Disabled -Id 'iconButton4'Disabled Icon Button|Creates a disabled icon button.-------------------------- EXAMPLE 5 --------------------------PS >New-UDIconButton -Icon (New-UDIcon -Icon user -Size sm) -Id 'iconButton5' -OnClick {PS >    Show-UDToast -Message 'Icon Button Clicked'PS >    Start-Sleep -Seconds 5PS > } -ShowLoadingIcon Button with Loading|Creates an icon button with a loading spinner.


---

# 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/comandos-de-powershell/new-udiconbutton.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.
