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

Namespace PSWriteHTML

Creates a new HTML carousel element with customizable options.

Remarks

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

Authored help example

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.

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

Parameters

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