New-UDButtonGroup
Synopsis
Creates a new button group.
Syntax
New-UDButtonGroup [[-Id] <String>] [[-Children] <ScriptBlock>] [[-ClassName] <String>] [[-Color] <Object>] [-Disabled] [-FullWidth] [[-Orientation] <String>] [[-Size] <String>] [[-Sx] <Hashtable>] [[-Variant] <String>] [<CommonParameters>]Description
Creates a button group. Use New-UDButtonGroupItem to add new items to the group.
Parameters
-Id
The ID of the component. It defaults to a random GUID.
Required? false
Position? 1
Default value ([Guid]::NewGuid()).ToString()
Accept pipeline input? false
Aliases
Accept wildcard characters? false-Children
The items in the group.
-ClassName
A CSS class to apply to the button group.
-Color
The color of the button group. Valid values are: "primary", "secondary", "success", "warning", "error", "success", "info"
-Disabled
Disables the button group.
-FullWidth
Makes the button group full width.
-Orientation
The orientation of the button group. Valid values are: "horizontal", "vertical"
-Size
The size of the button group. Valid values are: "small", "medium", "large"
-Sx
An hashtable of styles to apply to this component.
-Variant
The variant of the button group. Valid values are: "contained", "outlined", "text"
Common parameters
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.
Outputs
Examples
Example 1: Basic button group
The button group offers two items.
Example 2: Color
You can use the -Color parameter to change the color of the button group.
Example 3: Vertical
You can use the -Orientation parameter to change the orientation of the button group.
Example 4: Size
You can use the -Size parameter to change the size of the button group.
Example 5: Variant
You can use the -Variant parameter to change the variant of the button group.
Example 6: Disabled
You can use the -Disabled parameter to disable the button group.
Example 7: FullWidth
You can use the -FullWidth parameter to make the button group full width.
Example 8: Icon
You can use the -Icon parameter to add an icon to the button group item.
Example 9: Loading
You can use the -ShowLoading parameter to show a loading spinner when the button is clicked.
Last updated
Was this helpful?