New-UDSlider
Synopsis
A slider component.
Syntax
New-UDSlider [[-Id] <String>] [[-Value] <Int32[]>] [[-Minimum] <Int32>] [[-Maximum] <Int32>] [-Disabled] [-Marks] [[-OnChange] <Endpoint>] [[-Orientation] <String>] [[-Step] <Int32>] [[-ValueLabelDisplay] <String>] [[-ClassName] <String>] [[-Color] <String>] [[-Aria] <ScriptBlock>] [<CommonParameters>]Description
A slider component. Sliders can be used to define values within a range or selecting a range of values. You can use this component with New-UDForm.
Parameters
-Id
The ID of this component.
Required? false
Position? 1
Default value ([Guid]::NewGuid())
Accept pipeline input? false
Aliases
Accept wildcard characters? false-Value <Int32[]>
The value of the slider.
-Minimum
The minimum value of the slider.
-Maximum
The maximum value of the slider.
-Disabled
Whether the slider is disabled.
-Marks
Whether to display marks on the slider.
-OnChange
A script block that is invoked when the slider value changes. You can access the slider value within the script block by referencing the $EventData variable.
-Orientation
The orientation of the slider.
-Step
Step size of the slider.
-ValueLabelDisplay
Whether to display value labels.
-ClassName
A CSS class to apply to the slider.
-Color
The color of the slider. Defaults to 'primary'. Valid values: "primary", "secondary"
-Aria
A script block of New-UDAriaAttribute calls that supplies ARIA or role attributes for the slider.
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 Slider
Creates a basic slider.
Example 2: Slider with Marks
Creates a slider with marks.
Example 3: Vertical Slider
Creates a vertical slider.
Example 4: Disabled Slider
Creates a disabled slider.
Example 5: Slider with Value Labels
Creates a slider with value labels.
Example 6: Slider with Step
Creates a slider with a step size of 10.
Last updated
Was this helpful?