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-HTMLInfoCard

Namespace PSWriteHTML

Creates a dashboard info card with customizable styling options.

Remarks

The New-HTMLInfoCard function creates modern, responsive dashboard cards displaying key metrics or information. It supports multiple styles including standard, compact, fixed layout (multiline-safe), and classic designs.

Examples

Authored help example

EXAMPLE 1


New-HTMLInfoCard -Title "Total Users" -Number 47 -Subtitle "21.28% of users" -Icon "👥" -IconColor "#0078d4"
        

Creates a standard info card with a user icon and blue background.

EXAMPLE 2


New-HTMLInfoCard -Title "Sales Today" -Number 132 -Subtitle "12 waiting payments" -Style "Classic" -IconFromDictionary "Money" -IconColor "#21c87a"
        

Creates a classic style card using icon from dictionary.

EXAMPLE 3


New-HTMLInfoCard -Title "Analytics Report" -Number 156 -Subtitle "Reports generated" -IconSolid "chart-bar" -IconColor "#6f42c1"
        

Creates a card with FontAwesome solid icon.

EXAMPLE 4


New-HTMLInfoCard -Title "Revenue" -Number "$45,320" -Subtitle "This month" -Style "NoIcon" -Alignment "Center" -NumberColor "#21c87a"
        

Creates a centered card without an icon.

EXAMPLE 5


New-HTMLInfoCard -Title "Server Status" -Number "Online" -Subtitle "Last check: 2 min ago" -Icon "Server" -IconColor "#28a745" -TitleColor "#2c3e50" -SubtitleColor "#7f8c8d" -ShadowColor "rgba(40, 167, 69, 0.15)"
        

Creates a card with custom title, subtitle, and shadow colors.

EXAMPLE 6


New-HTMLInfoCard -Title "Alert" -Number "3" -Subtitle "Requires attention" -Icon "Warning" -IconColor "#dc3545" -ShadowDirection "Right" -ShadowColor "rgba(220, 53, 69, 0.2)"
        

Creates a card with a right-side red shadow for emphasis.

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-HTMLInfoCard [-Alignment <Left|Center|Right>] [-AnchorName <String>] [-BackgroundColor <String>] [-BorderRadius <String>] [-Icon <String>] [-IconColor <String>] [-Number <String>] [-NumberColor <String>] [-ShadowBlur <Int32>] [-ShadowColor <String>] [-ShadowDirection <Bottom|Top|Left|Right|All>] [-ShadowIntensity <Subtle|Normal|Bold|ExtraBold|Custom>] [-ShadowSpread <Int32>] [-Style <Standard|Compact|Fixed|Classic|NoIcon>] [-Subtitle <String>] [-SubtitleColor <String>] -Title <String> [-TitleColor <String>] [<CommonParameters>]
#
Parameter set: Emoji

Parameters

Alignment String optionalposition: namedpipeline: Falsevalues: 3
Text alignment within the card. Options: - 'Left' (default): Left-aligned text - 'Center': Center-aligned text - 'Right': Right-aligned text
Possible values: Left, Center, Right
AnchorName String optionalposition: namedpipeline: False
Optional anchor name for the card element.
BackgroundColor String optionalposition: namedpipeline: False
Background color of the card. Defaults to white.
BorderRadius String optionalposition: namedpipeline: False
Border radius for rounded corners. Defaults to 14px.
Icon String optionalposition: namedpipeline: False
Icon to display on the card. Can be an emoji (like 👥, 🔒, 💪).
IconColor String optionalposition: namedpipeline: False
Background color for the icon. Supports color names, hex codes, or RGB values.
Number String optionalposition: namedpipeline: False
The primary numeric value or main statistic to display.
NumberColor String optionalposition: namedpipeline: False
Color for the main number/statistic. Defaults to blue (#0078d4).
ShadowBlur Int32 optionalposition: namedpipeline: False
ShadowColor String optionalposition: namedpipeline: False
Color for the card shadow. Defaults to light gray (rgba(60, 60, 60, 0.08)).
ShadowDirection String optionalposition: namedpipeline: Falsevalues: 5
Direction/position of the card shadow. Options: - 'Bottom' (default): Standard shadow below the card - 'Top': Shadow above the card - 'Left': Shadow to the left of the card - 'Right': Shadow to the right of the card - 'All': Shadow on all sides
Possible values: Bottom, Top, Left, Right, All
ShadowIntensity String optionalposition: namedpipeline: Falsevalues: 5
Possible values: Subtle, Normal, Bold, ExtraBold, Custom
ShadowSpread Int32 optionalposition: namedpipeline: False
Style String optionalposition: namedpipeline: Falsevalues: 5
The visual style of the card. Options: - 'Standard' (default): Regular cards with icons on the left - 'Compact': Smaller cards with reduced padding - 'Fixed': Multiline-safe layout where numbers stay aligned - 'Classic': Traditional style with square colored icon backgrounds - 'NoIcon': Cards without any icons
Possible values: Standard, Compact, Fixed, Classic, NoIcon
Subtitle String optionalposition: namedpipeline: False
Optional subtitle or description text below the number.
SubtitleColor String optionalposition: namedpipeline: False
Color for the subtitle text. Defaults to medium gray (#666).
Title String requiredposition: namedpipeline: False
The main title/label text for the card.
TitleColor String optionalposition: namedpipeline: False
Color for the title text. Defaults to dark gray (#222).
New-HTMLInfoCard [-Alignment <Left|Center|Right>] [-AnchorName <String>] [-BackgroundColor <String>] [-BorderRadius <String>] [-IconColor <String>] [-Number <String>] [-NumberColor <String>] [-ShadowBlur <Int32>] [-ShadowColor <String>] [-ShadowDirection <Bottom|Top|Left|Right|All>] [-ShadowIntensity <Subtle|Normal|Bold|ExtraBold|Custom>] [-ShadowSpread <Int32>] [-Style <Standard|Compact|Fixed|Classic|NoIcon>] [-Subtitle <String>] [-SubtitleColor <String>] -Title <String> [-TitleColor <String>] [<CommonParameters>]
#
Parameter set: Dictionary

Parameters

Alignment String optionalposition: namedpipeline: Falsevalues: 3
Text alignment within the card. Options: - 'Left' (default): Left-aligned text - 'Center': Center-aligned text - 'Right': Right-aligned text
Possible values: Left, Center, Right
AnchorName String optionalposition: namedpipeline: False
Optional anchor name for the card element.
BackgroundColor String optionalposition: namedpipeline: False
Background color of the card. Defaults to white.
BorderRadius String optionalposition: namedpipeline: False
Border radius for rounded corners. Defaults to 14px.
IconColor String optionalposition: namedpipeline: False
Background color for the icon. Supports color names, hex codes, or RGB values.
Number String optionalposition: namedpipeline: False
The primary numeric value or main statistic to display.
NumberColor String optionalposition: namedpipeline: False
Color for the main number/statistic. Defaults to blue (#0078d4).
ShadowBlur Int32 optionalposition: namedpipeline: False
ShadowColor String optionalposition: namedpipeline: False
Color for the card shadow. Defaults to light gray (rgba(60, 60, 60, 0.08)).
ShadowDirection String optionalposition: namedpipeline: Falsevalues: 5
Direction/position of the card shadow. Options: - 'Bottom' (default): Standard shadow below the card - 'Top': Shadow above the card - 'Left': Shadow to the left of the card - 'Right': Shadow to the right of the card - 'All': Shadow on all sides
Possible values: Bottom, Top, Left, Right, All
ShadowIntensity String optionalposition: namedpipeline: Falsevalues: 5
Possible values: Subtle, Normal, Bold, ExtraBold, Custom
ShadowSpread Int32 optionalposition: namedpipeline: False
Style String optionalposition: namedpipeline: Falsevalues: 5
The visual style of the card. Options: - 'Standard' (default): Regular cards with icons on the left - 'Compact': Smaller cards with reduced padding - 'Fixed': Multiline-safe layout where numbers stay aligned - 'Classic': Traditional style with square colored icon backgrounds - 'NoIcon': Cards without any icons
Possible values: Standard, Compact, Fixed, Classic, NoIcon
Subtitle String optionalposition: namedpipeline: False
Optional subtitle or description text below the number.
SubtitleColor String optionalposition: namedpipeline: False
Color for the subtitle text. Defaults to medium gray (#666).
Title String requiredposition: namedpipeline: False
The main title/label text for the card.
TitleColor String optionalposition: namedpipeline: False
Color for the title text. Defaults to dark gray (#222).
New-HTMLInfoCard [-Alignment <Left|Center|Right>] [-AnchorName <String>] [-BackgroundColor <String>] [-BorderRadius <String>] [-IconColor <String>] [-IconSolid <String>] [-Number <String>] [-NumberColor <String>] [-ShadowBlur <Int32>] [-ShadowColor <String>] [-ShadowDirection <Bottom|Top|Left|Right|All>] [-ShadowIntensity <Subtle|Normal|Bold|ExtraBold|Custom>] [-ShadowSpread <Int32>] [-Style <Standard|Compact|Fixed|Classic|NoIcon>] [-Subtitle <String>] [-SubtitleColor <String>] -Title <String> [-TitleColor <String>] [<CommonParameters>]
#
Parameter set: FontAwesomeSolid

Parameters

Alignment String optionalposition: namedpipeline: Falsevalues: 3
Text alignment within the card. Options: - 'Left' (default): Left-aligned text - 'Center': Center-aligned text - 'Right': Right-aligned text
Possible values: Left, Center, Right
AnchorName String optionalposition: namedpipeline: False
Optional anchor name for the card element.
BackgroundColor String optionalposition: namedpipeline: False
Background color of the card. Defaults to white.
BorderRadius String optionalposition: namedpipeline: False
Border radius for rounded corners. Defaults to 14px.
IconColor String optionalposition: namedpipeline: False
Background color for the icon. Supports color names, hex codes, or RGB values.
IconSolid String optionalposition: namedpipeline: False
FontAwesome solid icon name.
Number String optionalposition: namedpipeline: False
The primary numeric value or main statistic to display.
NumberColor String optionalposition: namedpipeline: False
Color for the main number/statistic. Defaults to blue (#0078d4).
ShadowBlur Int32 optionalposition: namedpipeline: False
ShadowColor String optionalposition: namedpipeline: False
Color for the card shadow. Defaults to light gray (rgba(60, 60, 60, 0.08)).
ShadowDirection String optionalposition: namedpipeline: Falsevalues: 5
Direction/position of the card shadow. Options: - 'Bottom' (default): Standard shadow below the card - 'Top': Shadow above the card - 'Left': Shadow to the left of the card - 'Right': Shadow to the right of the card - 'All': Shadow on all sides
Possible values: Bottom, Top, Left, Right, All
ShadowIntensity String optionalposition: namedpipeline: Falsevalues: 5
Possible values: Subtle, Normal, Bold, ExtraBold, Custom
ShadowSpread Int32 optionalposition: namedpipeline: False
Style String optionalposition: namedpipeline: Falsevalues: 5
The visual style of the card. Options: - 'Standard' (default): Regular cards with icons on the left - 'Compact': Smaller cards with reduced padding - 'Fixed': Multiline-safe layout where numbers stay aligned - 'Classic': Traditional style with square colored icon backgrounds - 'NoIcon': Cards without any icons
Possible values: Standard, Compact, Fixed, Classic, NoIcon
Subtitle String optionalposition: namedpipeline: False
Optional subtitle or description text below the number.
SubtitleColor String optionalposition: namedpipeline: False
Color for the subtitle text. Defaults to medium gray (#666).
Title String requiredposition: namedpipeline: False
The main title/label text for the card.
TitleColor String optionalposition: namedpipeline: False
Color for the title text. Defaults to dark gray (#222).
New-HTMLInfoCard [-Alignment <Left|Center|Right>] [-AnchorName <String>] [-BackgroundColor <String>] [-BorderRadius <String>] [-IconColor <String>] [-IconRegular <String>] [-Number <String>] [-NumberColor <String>] [-ShadowBlur <Int32>] [-ShadowColor <String>] [-ShadowDirection <Bottom|Top|Left|Right|All>] [-ShadowIntensity <Subtle|Normal|Bold|ExtraBold|Custom>] [-ShadowSpread <Int32>] [-Style <Standard|Compact|Fixed|Classic|NoIcon>] [-Subtitle <String>] [-SubtitleColor <String>] -Title <String> [-TitleColor <String>] [<CommonParameters>]
#
Parameter set: FontAwesomeRegular

Parameters

Alignment String optionalposition: namedpipeline: Falsevalues: 3
Text alignment within the card. Options: - 'Left' (default): Left-aligned text - 'Center': Center-aligned text - 'Right': Right-aligned text
Possible values: Left, Center, Right
AnchorName String optionalposition: namedpipeline: False
Optional anchor name for the card element.
BackgroundColor String optionalposition: namedpipeline: False
Background color of the card. Defaults to white.
BorderRadius String optionalposition: namedpipeline: False
Border radius for rounded corners. Defaults to 14px.
IconColor String optionalposition: namedpipeline: False
Background color for the icon. Supports color names, hex codes, or RGB values.
IconRegular String optionalposition: namedpipeline: False
FontAwesome regular icon name.
Number String optionalposition: namedpipeline: False
The primary numeric value or main statistic to display.
NumberColor String optionalposition: namedpipeline: False
Color for the main number/statistic. Defaults to blue (#0078d4).
ShadowBlur Int32 optionalposition: namedpipeline: False
ShadowColor String optionalposition: namedpipeline: False
Color for the card shadow. Defaults to light gray (rgba(60, 60, 60, 0.08)).
ShadowDirection String optionalposition: namedpipeline: Falsevalues: 5
Direction/position of the card shadow. Options: - 'Bottom' (default): Standard shadow below the card - 'Top': Shadow above the card - 'Left': Shadow to the left of the card - 'Right': Shadow to the right of the card - 'All': Shadow on all sides
Possible values: Bottom, Top, Left, Right, All
ShadowIntensity String optionalposition: namedpipeline: Falsevalues: 5
Possible values: Subtle, Normal, Bold, ExtraBold, Custom
ShadowSpread Int32 optionalposition: namedpipeline: False
Style String optionalposition: namedpipeline: Falsevalues: 5
The visual style of the card. Options: - 'Standard' (default): Regular cards with icons on the left - 'Compact': Smaller cards with reduced padding - 'Fixed': Multiline-safe layout where numbers stay aligned - 'Classic': Traditional style with square colored icon backgrounds - 'NoIcon': Cards without any icons
Possible values: Standard, Compact, Fixed, Classic, NoIcon
Subtitle String optionalposition: namedpipeline: False
Optional subtitle or description text below the number.
SubtitleColor String optionalposition: namedpipeline: False
Color for the subtitle text. Defaults to medium gray (#666).
Title String requiredposition: namedpipeline: False
The main title/label text for the card.
TitleColor String optionalposition: namedpipeline: False
Color for the title text. Defaults to dark gray (#222).
New-HTMLInfoCard [-Alignment <Left|Center|Right>] [-AnchorName <String>] [-BackgroundColor <String>] [-BorderRadius <String>] [-IconBrands <String>] [-IconColor <String>] [-Number <String>] [-NumberColor <String>] [-ShadowBlur <Int32>] [-ShadowColor <String>] [-ShadowDirection <Bottom|Top|Left|Right|All>] [-ShadowIntensity <Subtle|Normal|Bold|ExtraBold|Custom>] [-ShadowSpread <Int32>] [-Style <Standard|Compact|Fixed|Classic|NoIcon>] [-Subtitle <String>] [-SubtitleColor <String>] -Title <String> [-TitleColor <String>] [<CommonParameters>]
#
Parameter set: FontAwesomeBrands

Parameters

Alignment String optionalposition: namedpipeline: Falsevalues: 3
Text alignment within the card. Options: - 'Left' (default): Left-aligned text - 'Center': Center-aligned text - 'Right': Right-aligned text
Possible values: Left, Center, Right
AnchorName String optionalposition: namedpipeline: False
Optional anchor name for the card element.
BackgroundColor String optionalposition: namedpipeline: False
Background color of the card. Defaults to white.
BorderRadius String optionalposition: namedpipeline: False
Border radius for rounded corners. Defaults to 14px.
IconBrands String optionalposition: namedpipeline: False
FontAwesome brands icon name.
IconColor String optionalposition: namedpipeline: False
Background color for the icon. Supports color names, hex codes, or RGB values.
Number String optionalposition: namedpipeline: False
The primary numeric value or main statistic to display.
NumberColor String optionalposition: namedpipeline: False
Color for the main number/statistic. Defaults to blue (#0078d4).
ShadowBlur Int32 optionalposition: namedpipeline: False
ShadowColor String optionalposition: namedpipeline: False
Color for the card shadow. Defaults to light gray (rgba(60, 60, 60, 0.08)).
ShadowDirection String optionalposition: namedpipeline: Falsevalues: 5
Direction/position of the card shadow. Options: - 'Bottom' (default): Standard shadow below the card - 'Top': Shadow above the card - 'Left': Shadow to the left of the card - 'Right': Shadow to the right of the card - 'All': Shadow on all sides
Possible values: Bottom, Top, Left, Right, All
ShadowIntensity String optionalposition: namedpipeline: Falsevalues: 5
Possible values: Subtle, Normal, Bold, ExtraBold, Custom
ShadowSpread Int32 optionalposition: namedpipeline: False
Style String optionalposition: namedpipeline: Falsevalues: 5
The visual style of the card. Options: - 'Standard' (default): Regular cards with icons on the left - 'Compact': Smaller cards with reduced padding - 'Fixed': Multiline-safe layout where numbers stay aligned - 'Classic': Traditional style with square colored icon backgrounds - 'NoIcon': Cards without any icons
Possible values: Standard, Compact, Fixed, Classic, NoIcon
Subtitle String optionalposition: namedpipeline: False
Optional subtitle or description text below the number.
SubtitleColor String optionalposition: namedpipeline: False
Color for the subtitle text. Defaults to medium gray (#666).
Title String requiredposition: namedpipeline: False
The main title/label text for the card.
TitleColor String optionalposition: namedpipeline: False
Color for the title text. Defaults to dark gray (#222).