API Reference
Function
New-HTMLSection
Creates a new HTML section with customizable styling options.
Remarks
The New-HTMLSection function creates a new HTML section with various customizable styling options such as text alignment, background color, flexbox properties, and more.
Examples
EXAMPLE 1
New-HTMLSection -Content { "This is the content of the section." } -HeaderText "Section Title" -HeaderTextColor "blue" -HeaderTextSize "20px" -HeaderTextAlignment "center" -HeaderBackGroundColor "lightgray" -BackgroundColor "white" -CanCollapse -Height "200px" -Width "50%" -Wrap "wrap" -Direction "row" -AlignContent "center" -AlignItems "center" -JustifyContent "flex-start" -BorderRadius "10px" -AnchorName "section1" -StyleSheetsConfiguration @{ Section = 'customSection'; SectionText = 'customSectionText' }
EXAMPLE 2
New-HTMLSection -HeaderText "Cards with Responsive Layout" -Density Comfortable {
New-HTMLInfoCard -Title "Card 1" -Number 100 -Icon "📊"
New-HTMLInfoCard -Title "Card 2" -Number 200 -Icon "📈"
# Cards will automatically wrap and maintain comfortable spacing
}
EXAMPLE 3
$content = {
"This is a sample content."
}
New-HTMLSection -Content $content -HeaderText "Sample Section" -HeaderTextColor "red" -HeaderTextSize "18px" -HeaderTextAlignment "left" -HeaderBackGroundColor "lightblue" -BackgroundColor "lightyellow" -Height "150px" -Wrap "nowrap" -Direction "column" -AlignContent "flex-start" -AlignItems "flex-start" -JustifyContent "center" -BorderRadius "5px" -AnchorName "sampleSection" -StyleSheetsConfiguration @{ Section = 'customSection'; SectionText = 'customSectionText' }
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-HTMLSection [-AlignContent <flex-start>] [-AlignItems <stretch|flex-start|flex-end|center|baseline>] [-AnchorName <String>] [-BackgroundColor <String>] [-BorderRadius <0px>] [-CanCollapse] [-Collapsed] [-Content <ScriptBlock>] [-Density <Spacious|Comfortable|Compact|Dense|VeryDense>] [-Direction <row|row-reverse|column|column-reverse>] [-HeaderBackGroundColor <String>] [-HeaderText <String>] [-HeaderTextAlignment <center|left|right|justify>] [-HeaderTextColor <String>] [-HeaderTextSize <String>] [-Height <Object>] [-Invisible] [-IsHidden] [-JustifyContent <flex-start|flex-end|center>] [-Margin <Object>] [-StyleSheetsConfiguration <IDictionary>] [-Width <Object>] [-Wrap <wrap|nowrap|wrap-reverse>] [<CommonParameters>]
#
Parameter set:
All Parameter SetsParameters
- AlignContent String
- Specifies the align-content property. Valid values are 'flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'stretch'.
- Possible values:
flex-start,flex-end,center,space-between,space-around,stretch - AlignItems String
- Specifies the align-items property. Valid values are 'stretch', 'flex-start', 'flex-end', 'center', 'baseline'.
- Possible values:
stretch,flex-start,flex-end,center,baseline - AnchorName String
- Specifies the anchor name for the section.
- BackgroundColor String
- Specifies the background color of the section.
- BorderRadius String
- Specifies the border radius of the section. Valid values are '0px', '5px', '10px', '15px', '20px', '25px'.
- Possible values:
0px,5px,10px,15px,20px,25px - CanCollapse SwitchParameter
- Indicates whether the section can be collapsed.
- Collapsed SwitchParameter
- Indicates whether the section is collapsed.
- Content ScriptBlock
- Specifies the content of the HTML section as a ScriptBlock.
- Density String
- 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 - Direction String
- Specifies the flex-direction property. Valid values are 'row', 'row-reverse', 'column', 'column-reverse'.
- Possible values:
row,row-reverse,column,column-reverse - HeaderBackGroundColor String
- Specifies the background color of the header.
- HeaderText String
- Specifies the header text of the section.
- HeaderTextAlignment String
- Specifies the text alignment of the header. Valid values are 'center', 'left', 'right', 'justify'.
- Possible values:
center,left,right,justify - HeaderTextColor String
- Specifies the text color of the header.
- HeaderTextSize String
- Specifies the text size of the header.
- Height Object
- Specifies the height of the section.
- Invisible SwitchParameter
- Indicates whether the section is invisible.
- IsHidden SwitchParameter
- Indicates whether the section is initially hidden.
- JustifyContent String
- Specifies the justify-content property. Valid values are 'flex-start', 'flex-end', 'center'.
- Possible values:
flex-start,flex-end,center - Margin Object
- Specifies the margin of the section.
- StyleSheetsConfiguration IDictionary
- Specifies the configuration for style sheets.
- Width Object
- Specifies the width of the section. Default value is '100%'.
- Wrap String
- Specifies the flex-wrap property. Valid values are 'wrap', 'nowrap', 'wrap-reverse'.
- Possible values:
wrap,nowrap,wrap-reverse