Evotec

Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-HTMLPanel

Aliases: New-HTMLColumn
Namespace PSWriteHTML
Aliases
New-HTMLColumn

Creates a new HTML panel with customizable styling options.

Remarks

The New-HTMLPanel function creates a new HTML panel with various styling options such as background color, width, margin, alignment, and more.

Examples

Authored help example

EXAMPLE 1


New-HTMLPanel -Content { "This is the content of the panel" } -BackgroundColor "lightblue" -Width "50%" -Margin "10px" -AlignContentText "center" -BorderRadius "5px" -AnchorName "myPanel" -StyleSheetsConfiguration @{ Panel = "customPanel" }
        

Creates a new HTML panel with specified content, background color, width, margin, alignment, border radius, anchor name, and custom style sheet configuration.

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-HTMLPanel [-AlignContentText <center|left|right|justify>] [-AnchorName <String>] [-BackgroundColor <String>] [-BorderRadius <0px>] [-Content <ScriptBlock>] [-Density <Spacious|Comfortable|Compact|Dense|VeryDense>] [-Height <Object>] [-Invisible] [-Margin <String>] [-StyleSheetsConfiguration <IDictionary>] [-Width <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AlignContentText String optionalposition: namedpipeline: Falsevalues: 4
Specifies the alignment of the content within the panel.
Possible values: center, left, right, justify
AnchorName String optionalposition: namedpipeline: False
Specifies the anchor name of the panel.
BackgroundColor String optionalposition: namedpipeline: Falsealiases: BackgroundShade
Specifies the background color of the HTML panel.
BorderRadius String optionalposition: namedpipeline: Falsevalues: 6
Specifies the border radius of the panel.
Possible values: 0px, 5px, 10px, 15px, 20px, 25px
Content ScriptBlock optionalposition: 0pipeline: False
Specifies the content of the HTML panel as a ScriptBlock.
Density String optionalposition: namedpipeline: Falsevalues: 5
Specifies the density of the panel. This will automatically enable responsive wrapping for the panel. The options are: Spacious, Comfortable, Compact, Dense, VeryDense.
Possible values: Spacious, Comfortable, Compact, Dense, VeryDense
Height Object optionalposition: namedpipeline: False
Invisible SwitchParameter optionalposition: namedpipeline: False
Indicates whether the panel should be invisible.
Margin String optionalposition: namedpipeline: False
Specifies the margin of the panel.
StyleSheetsConfiguration IDictionary optionalposition: namedpipeline: False
Specifies the style sheets configuration for the panel.
Width String optionalposition: namedpipeline: Falsealiases: flex-basis
Specifies the width of the panel.