> 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/comandi-powershell/new-udbuttongroup.md).

# New-UDButtonGroup

### Sinossi

Crea un nuovo gruppo di pulsanti.

### Sintassi

```powershell
New-UDButtonGroup [[-Id] <String>] [[-Children] <ScriptBlock>] [[-ClassName] <String>] [[-Color] <Object>] [-Disabled] [-FullWidth] [[-Orientation] <String>] [[-Size] <String>] [[-Sx] <Hashtable>] [[-Variant] <String>] [<CommonParameters>]
```

### Descrizione

Crea un gruppo di pulsanti. Utilizzi New-UDButtonGroupItem per aggiungere nuovi elementi al gruppo.

### Parametri

#### -Id

L'ID del componente. Per impostazione predefinita è un GUID casuale.

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

#### -Children

Gli elementi del gruppo.

```
Required?                    false
Position?                    2
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -ClassName

Una classe CSS da applicare al gruppo di pulsanti.

```
Required?                    false
Position?                    3
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Color Il colore del gruppo di pulsanti. I valori validi sono: "primary", "secondary", "success", "warning", "error", "success", "info"Required?                    falsePosition?                    4Default value                primaryAccept pipeline input?       falseAliasesAccept wildcard characters?  false    -Disabled \[\<SwitchParameter>]        Disables the button group.Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false    -FullWidth \[\<SwitchParameter>]        Makes the button group full width.Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false-OrientationL'orientamento del gruppo di pulsanti. I valori validi sono: "horizontal", "vertical"Required?                    falsePosition?                    5Default value                horizontalAccept pipeline input?       falseAliasesAccept wildcard characters?  false-SizeLa dimensione del gruppo di pulsanti. I valori validi sono: "small", "medium", "large"Required?                    falsePosition?                    6Default value                mediumAccept pipeline input?       falseAliasesAccept wildcard characters?  false-SxUna hashtable di stili da applicare a questo componente.Required?                    falsePosition?                    7Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-VariantLa variante del gruppo di pulsanti. I valori validi sono: "contained", "outlined", "text"Required?                    falsePosition?                    8Default value                outlinedAccept 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).Output--------------------------> ESEMPIO 1 --------------------------PS >New-UDButtonGroup -Content {PS >     New-UDButtonGroupItem -Text 'Delete'PS >     New-UDButtonGroupItem -Text 'Copy'PS > }Basic button group|The button group offers two items.-------------------------- EXAMPLE 2 --------------------------PS >New-UDButtonGroup -Content {PS >     New-UDButtonGroupItem -Text 'Delete'PS >     New-UDButtonGroupItem -Text 'Copy'PS > } -Color 'success'Color|You can use the -Color parameter to change the color of the button group.-------------------------- EXAMPLE 3 --------------------------PS >New-UDButtonGroup -Content {PS >     New-UDButtonGroupItem -Text 'Delete'PS >     New-UDButtonGroupItem -Text 'Copy'PS > } -Orientation 'vertical'Vertical|You can use the -Orientation parameter to change the orientation of the button group.-------------------------- EXAMPLE 4 --------------------------PS >New-UDButtonGroup -Content {PS >     New-UDButtonGroupItem -Text 'Delete'PS >     New-UDButtonGroupItem -Text 'Copy'PS > } -Size 'small'PS > New-UDButtonGroup -Content {PS >     New-UDButtonGroupItem -Text 'Delete'PS >     New-UDButtonGroupItem -Text 'Copy'PS > } -Size 'medium'PS > New-UDButtonGroup -Content {PS >     New-UDButtonGroupItem -Text 'Delete'PS >     New-UDButtonGroupItem -Text 'Copy'PS > } -Size 'large'Size|You can use the -Size parameter to change the size of the button group.-------------------------- EXAMPLE 5 --------------------------PS >New-UDButtonGroup -Content {PS >     New-UDButtonGroupItem -Text 'Delete'PS >     New-UDButtonGroupItem -Text 'Copy'PS > } -Variant 'contained'PS > New-UDButtonGroup -Content {PS >     New-UDButtonGroupItem -Text 'Delete'PS >     New-UDButtonGroupItem -Text 'Copy'PS > } -Variant 'outlined'PS > New-UDButtonGroup -Content {PS >     New-UDButtonGroupItem -Text 'Delete'PS >     New-UDButtonGroupItem -Text 'Copy'PS > } -Variant 'text'Variant|You can use the -Variant parameter to change the variant of the button group.-------------------------- EXAMPLE 6 --------------------------PS >New-UDButtonGroup -Content {PS >     New-UDButtonGroupItem -Text 'Delete'PS >     New-UDButtonGroupItem -Text 'Copy'PS > } -DisabledDisabled|You can use the -Disabled parameter to disable the button group.-------------------------- EXAMPLE 7 --------------------------PS >New-UDButtonGroup -Content {PS >     New-UDButtonGroupItem -Text 'Delete'PS >     New-UDButtonGroupItem -Text 'Copy'PS > } -FullWidthFullWidth|You can use the -FullWidth parameter to make the button group full width.-------------------------- EXAMPLE 8 --------------------------PS >New-UDButtonGroup -Content {PS >     New-UDButtonGroupItem -Text 'Delete' -Icon (New-UDIcon -Icon 'trash')PS >     New-UDButtonGroupItem -Text 'Copy'  -Icon (New-UDIcon -Icon 'copy')PS > }Icon|You can use the -Icon parameter to add an icon to the button group item.-------------------------- EXAMPLE 9 --------------------------PS >New-UDButtonGroup -Content {PS >     New-UDButtonGroupItem -Text 'Delete' -Icon (New-UDIcon -Icon 'trash') -ShowLoading -OnClick {PS >        Start-Sleep -Seconds 5PS >     }PS >     New-UDButtonGroupItem -Text 'Copy'  -Icon (New-UDIcon -Icon 'copy')PS > }Loading|You can use the -ShowLoading parameter to show a loading spinner when the button is clicked.


---

# 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/it/comandi-powershell/new-udbuttongroup.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.
