API Reference
Command
New-HtmlXSwitch
Creates a toggle switch control.
Remarks
Part of the HtmlForgeX.PowerShell DSL.
Examples
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
- Mark as checked.
- Disabled SwitchParameter
- Mark as disabled.
- Hint string
- Hint text.
- Label string
- Label text.
- Name string
- Switch name/id.
- Required SwitchParameter
- Mark as required.
- Size SwitchSize
- Switch size preset. Possible values: Default, Small, Medium, Large
- Possible values:
Default,Small,Medium,Large - Stacked SwitchParameter
- Stack label above the switch.
- ValidationMessage string
- Validation message.
- ValidationState ValidationState
- Validation state. Possible values: Valid, Invalid, Warning
- Possible values:
Valid,Invalid,Warning
Outputs
HtmlForgeX.TablerSwitch