# New-HTMLCarousel

Creates a new HTML carousel element with customizable options.

Project

PSWriteHTML

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

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML/1.40.0)

Stars **1,025**

Forks **114**

Open issues 

PowerShell Gallery downloads **7,576,901**

Release **v1.45.0**

Language: PowerShell Updated: 2026-11-19

Command 

**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>]
```

[#](#member-fd267f70aced7579da65cd3b)

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

```powershell
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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:D88AB563C8645A70F3832246BDF0D1ECA3CC6DD2D384394084464DEA8185E1C2 -->
