HtmlForgeX

API Reference

Command

New-HtmlXModal

Namespace HtmlForgeX.PowerShell
Outputs
HtmlForgeX.TablerModal

Creates a Tabler modal dialog.

Remarks

Part of the HtmlForgeX.PowerShell DSL.

Examples

Authored help example

Example 1: Create a modal with body and footer.


New-HtmlXModal -Title "Confirm" -Size Large {
    New-HtmlXModalBody {
        New-HtmlXText -Text "Are you sure?"
    }
    New-HtmlXModalFooter {
        New-HtmlXButton -Text "Cancel" -Variant Secondary
        New-HtmlXButton -Text "Confirm" -Variant Primary
    }
}
        

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-HtmlXModal [-Content <ScriptBlock>] [-Scrollable] [-Size <Default|Small|Large|FullWidth>] [-Title <string>] [<CommonParameters>]
#

Parameters

Content ScriptBlock optionalposition: 0pipeline: false
Scriptblock that defines modal body/footer.
Scrollable SwitchParameter optionalposition: namedpipeline: false
Enable scrollable dialog body.
Size TablerModalSize optionalposition: namedpipeline: falsevalues: 4
Modal size preset. Possible values: Default, Small, Large, FullWidth
Possible values: Default, Small, Large, FullWidth
Title string optionalposition: namedpipeline: false
Modal title.

Outputs

HtmlForgeX.TablerModal