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

New-UDStep

Creates a new step for a stepper.

Synopsis

Creates a new step for a stepper.

Syntax

New-UDStep [[-Id] <String>] [-OnLoad] <Endpoint> [[-Label] <String>] [-Optional] [-DisablePrevious] [[-Icon] <Object>] [-RemoveIconStyle] [[-IconStyle] <Hashtable>] [[-DarkIconStyle] <Hashtable>] [<CommonParameters>]

Description

Creates a new step for a stepper. Add to the Children (alias Steps) parameter for New-UDStepper.

Parameters

-Id

The ID of the component. It defaults to a random GUID.

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

-OnLoad

The script block that is executed when the step is loaded. The script block will receive the $Body parameter which contains JSON for the current state of the stepper. If you are using form controls, their data will be availalble in the $Body.Context property.

-Label

A label for this step.

-Icon The icon to put with the stepRequired? falsePosition? 4Default valueAccept pipeline input? falseAliasesAccept wildcard characters? false -RemoveIconStyle [<SwitchParameter>] Removes circle style around iconRequired? falsePosition? namedDefault value FalseAccept pipeline input? falseAliasesAccept wildcard characters? false-IconStyleRequired? falsePosition? 5Default valueAccept pipeline input? falseAliasesAccept wildcard characters? false-DarkIconStyleRequired? falsePosition? 6Default valueAccept 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).Outputs-------------------------- EXAMPLE 1 --------------------------PS > Creates a stepper that reports the stepper context with each step.New-UDStepper -Id 'stepper' -Steps { New-UDStep -OnLoad { New-UDElement -tag 'div' -Content { "Step 1" } New-UDTextbox -Id 'txtStep1' } -Label "Step 1" New-UDStep -OnLoad { New-UDElement -tag 'div' -Content { "Step 2" } New-UDElement -tag 'div' -Content { "Previous data: $Body" } New-UDTextbox -Id 'txtStep2' } -Label "Step 2" New-UDStep -OnLoad { New-UDElement -tag 'div' -Content { "Step 3" } New-UDElement -tag 'div' -Content { "Previous data: $Body" } New-UDTextbox -Id 'txtStep3' } -Label "Step 3"} -OnFinish { New-UDTypography -Text 'Nice! You did it!' -Variant h3 New-UDElement -Tag 'div' -Id 'result' -Content {$Body}}

Last updated

Was this helpful?