HtmlForgeX

API Reference

Command

New-HtmlXSwitch

Namespace HtmlForgeX.PowerShell
Outputs
HtmlForgeX.TablerSwitch

Creates a toggle switch control.

Remarks

Part of the HtmlForgeX.PowerShell DSL.

Examples

Imported script example

New-HtmlXSwitch -Name "enabled" -Label "Enable account" -Checked
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

New-HtmlXSwitch [-Checked] [-Disabled] [-Hint <string>] [-Label <string>] [-Name <string>] [-Required] [-Size <Default|Small|Medium|Large>] [-Stacked] [-ValidationMessage <string>] [-ValidationState <Valid|Invalid|Warning>] [<CommonParameters>]
#

Parameters

Checked SwitchParameter optionalposition: namedpipeline: false
Mark as checked.
Disabled SwitchParameter optionalposition: namedpipeline: false
Mark as disabled.
Hint string optionalposition: namedpipeline: false
Hint text.
Label string optionalposition: namedpipeline: false
Label text.
Name string optionalposition: namedpipeline: false
Switch name/id.
Required SwitchParameter optionalposition: namedpipeline: false
Mark as required.
Size SwitchSize optionalposition: namedpipeline: falsevalues: 4
Switch size preset. Possible values: Default, Small, Medium, Large
Possible values: Default, Small, Medium, Large
Stacked SwitchParameter optionalposition: namedpipeline: false
Stack label above the switch.
ValidationMessage string optionalposition: namedpipeline: false
Validation message.
ValidationState ValidationState optionalposition: namedpipeline: falsevalues: 3
Validation state. Possible values: Valid, Invalid, Warning
Possible values: Valid, Invalid, Warning

Outputs

HtmlForgeX.TablerSwitch