Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

Stars 1,023
Forks 115
Open issues 54
PowerShell Gallery downloads 7,576,901
Release v1.45.0
Language: PowerShell Updated: 2026-11-03
Command

New-HTMLCarousel

Module
PSWriteHTML

Creates a new HTML carousel element with customizable options.

Syntax

New-HTMLCarousel
[[-Align] <center|start|end|justify>]
[[-ArrowTemplate] <String[]>]
[-AutoPlay]
[[-AutoPlayEvery] <Nullable`1>]
[-AutoPlayPauseOnFocus]
[-AutoPlayPauseOnHover]
[-AutoPlayRewind]
[[-AutoPlaySyncID] <String>]
[-Count]
[[-CountTemplate] <String>]
[-DisableArrows]
[[-Height] <adaptive|equal|auto>]
[-Loop]
[[-Margin] <String>]
[[-Mode] <Horizontal|Vertical>]
[[-MoveBy] <Nullable`1>]
[-MoveOnClick]
[-Pagination]
[[-PaginationTemplate] <String>]
[[-PerView] <Object>]
[[-Slide] <ScriptBlock>]
[[-Speed] <Nullable`1>]
[[-StartAt] <Nullable`1>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

This function creates a new HTML carousel element with the specified options such as slide content, mode (Horizontal/Vertical), alignment, number of slides per view, height, margin, looping, pagination, speed, starting slide, autoplay settings, arrow visibility, and more.

Examples

Example 1

New-HTMLCarousel -Slide { "Slide Content Here" } -Mode Horizontal -Align center -PerView 3 -Height adaptive -Margin '10px' -Loop -Pagination -Speed 500 -MoveBy 1 -StartAt 0 -MoveOnClick -AutoPlay -AutoPlayEvery 3000 -AutoPlayRewind -AutoPlayPauseOnFocus -AutoPlayPauseOnHover -AutoPlaySyncID 'carousel1' -DisableArrows -ArrowTemplate @('left-arrow', 'right-arrow') -PaginationTemplate 'index' -Count -CountTemplate 'Slide {index} of {total}'

Creates a new HTML carousel with the specified options.

Parameters

-Align String optionalposition: 2
Specifies the alignment of the carousel slides (center/start/end/justify).
Possible values: center, start, end, justify
-ArrowTemplate String[] optionalposition: 11
Specifies custom arrow templates.
-AutoPlay SwitchParameter optionalaliases: Stream
Indicates whether autoplay is enabled.
-AutoPlayEvery Nullable<T> optionalposition: 9aliases: StreamEvery
Specifies the interval for autoplay.
-AutoPlayPauseOnFocus SwitchParameter optionalaliases: StreamPauseOnFocus
Indicates whether autoplay should pause on focus.
-AutoPlayPauseOnHover SwitchParameter optionalaliases: StreamPauseOnHover
Indicates whether autoplay should pause on hover.
-AutoPlayRewind SwitchParameter optionalaliases: StreamRewind
Indicates whether autoplay should rewind.
-AutoPlaySyncID String optionalposition: 10aliases: StreamSyncID
Specifies the ID to sync autoplay with.
-Count SwitchParameter optional
Indicates whether slide count should be displayed.
-CountTemplate String optionalposition: 13
Specifies the template for displaying slide count.
-DisableArrows SwitchParameter optional
Indicates whether the arrow navigation should be disabled.
-Height String optionalposition: 4
Specifies the height of the carousel (adaptive/equal/auto).
Possible values: adaptive, equal, auto
-Loop SwitchParameter optional
Indicates whether the carousel should loop.
-Margin String optionalposition: 5
Specifies the margin between slides.
-Mode String optionalposition: 1
Specifies the mode of the carousel (Horizontal/Vertical). Default is Horizontal.
Possible values: Horizontal, Vertical
-MoveBy Nullable<T> optionalposition: 7
Specifies the number of slides to move at a time.
-MoveOnClick SwitchParameter optional
Indicates whether the carousel should move to the next slide on click.
-Pagination SwitchParameter optional
Indicates whether pagination should be enabled.
-PaginationTemplate String optionalposition: 12
Specifies the pagination template ('default'/'index'/'custom').
-PerView Object optionalposition: 3
Specifies the number of slides per view.
-Slide ScriptBlock optionalposition: 0
Specifies the content of the carousel slide as a script block.
-Speed Nullable<T> optionalposition: 6
Specifies the speed of the carousel animation.
-StartAt Nullable<T> optionalposition: 8
Specifies the index of the slide to start at.

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.