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

New-UDMenuItem

Synopsis

Creates a menu item.

Syntax

New-UDMenuItem [[-Id] <String>] [[-Text] <String>] [[-Value] <String>] [[-Icon] <Hashtable>] [[-OnClick] <Endpoint>] [[-Sx] <Hashtable>] [[-Style] <Hashtable>] [<CommonParameters>]

Description

Creates a menu item.

Parameters

-Id

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

-Text

The text to display in the menu item.

-Value

The value of the menu item. If not specified, the text will be used.

-Icon

The icon to display in the menu item. Use New-UDIcon to create an icon.

-OnClick

An event handler to call when the user selects the menu item.

-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.

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

Creates a simple menu.

Last updated

Was this helpful?