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

New-UDMenu

Menus display a list of choices on temporary surfaces.

Synopsis

Menus display a list of choices on temporary surfaces.

Syntax

New-UDMenu [[-Id] <String>] [[-Text] <String>] [[-OnChange] <Endpoint>] [-Children] <ScriptBlock> [[-ClassName] <ParameterAttribute>] [[-Variant] <String>] [[-Icon] <Hashtable>] [[-Size] <String>] [[-Sx] <Hashtable>] [[-Style] <Hashtable>] [<CommonParameters>]

Description

Creates a pop up menu.

Parameters

-Id

The ID of this component.

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

-Text

The text to display in the button that opens this menu.

-OnChange

An event handler to call when the user selects an item from the menu. $EventData will include the selected item.

-Children

The items to display in the menu.

-ClassName

The class name of the menu.

-Variant

The button variant for the menu.

-Icon

-Size

The size of the menu button. Valid values are: "small", "medium"

-Sx

The sx prop allows you to add custom styles to the component.

-Style

The style prop allows you to add custom styles to the component.

Outputs

-------------------------- EXAMPLE 1 --------------------------

Last updated

Was this helpful?