For the complete documentation index, see llms.txt. This page is also available as Markdown.

New-UDToggleButtonGroup

Synopsis

A Toggle Button can be used to group related options.

Syntax

New-UDToggleButtonGroup [[-Id] <String>] [[-Color] <String>] [-Disabled] [-Exclusive] [-FullWidth] [[-OnChange] <Endpoint>] [[-Size] <String>] [[-Orientation] <String>] [[-Sx] <Hashtable>] [[-Value] <String[]>] [-Children] <ScriptBlock> [[-Aria] <ScriptBlock>] [<CommonParameters>]

Description

A Toggle Button can be used to group related options.

Parameters

-Id

The ID of the component. If not specified, a random GUID will be assigned.

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

-Color

The color of the component. Valid values are 'standard', 'primary', 'secondary', 'error', 'info', 'success', 'warning'.

-Disabled

If specified, the component will be disabled.

-Exclusive

If specified, the component will only allow a single selection.

-FullWidth

If specified, the component will take up the full width of its container.

-OnChange

The endpoint to call when the value of the component changes.

-Size

The size of the component. Valid values are 'small', 'medium', 'large'.

-Orientation

The orientation of the component. Valid values are 'horizontal', 'vertical'.

-Sx

The style of the component.

-Value <String[]>

The value of the component.

-Children

The content of the component. Use New-UDToggleButton to create toggle buttons.

-Aria

A script block of New-UDAriaAttribute calls that supplies ARIA or role attributes for the toggle button group.

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: Exclusive selection

With exclusive selection, selecting one option deselects any other.

Example 2: Multiple selection

With multiple selection, selecting one option does not deselect any other.

Example 3: Size

The small size is equivalent to the dense toggle button styling.

Example 4: Orientation

The vertical orientation can be used to display a column of toggle buttons.

Example 5: OnChange

The OnChange endpoint is called when the value of the component changes. The event data is the value of the component.

Last updated

Was this helpful?