API Reference
New-HTMLCarousel
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
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>]
#
All Parameter SetsParameters
- Align String
- Specifies the alignment of the carousel slides (center/start/end/justify).
- Possible values:
center,start,end,justify - ArrowTemplate String[]
- Specifies custom arrow templates.
- AutoPlay SwitchParameter
- Indicates whether autoplay is enabled.
- AutoPlayEvery Nullable`1
- Specifies the interval for autoplay.
- AutoPlayPauseOnFocus SwitchParameter
- Indicates whether autoplay should pause on focus.
- AutoPlayPauseOnHover SwitchParameter
- Indicates whether autoplay should pause on hover.
- AutoPlayRewind SwitchParameter
- Indicates whether autoplay should rewind.
- AutoPlaySyncID String
- Specifies the ID to sync autoplay with.
- Count SwitchParameter
- Indicates whether slide count should be displayed.
- CountTemplate String
- Specifies the template for displaying slide count.
- DisableArrows SwitchParameter
- Indicates whether the arrow navigation should be disabled.
- Height String
- Specifies the height of the carousel (adaptive/equal/auto).
- Possible values:
adaptive,equal,auto - Loop SwitchParameter
- Indicates whether the carousel should loop.
- Margin String
- Specifies the margin between slides.
- Mode String
- Specifies the mode of the carousel (Horizontal/Vertical). Default is Horizontal.
- Possible values:
Horizontal,Vertical - MoveBy Nullable`1
- Specifies the number of slides to move at a time.
- MoveOnClick SwitchParameter
- Indicates whether the carousel should move to the next slide on click.
- Pagination SwitchParameter
- Indicates whether pagination should be enabled.
- PaginationTemplate String
- Specifies the pagination template ('default'/'index'/'custom').
- PerView Object
- Specifies the number of slides per view.
- Slide ScriptBlock
- Specifies the content of the carousel slide as a script block.
- Speed Nullable`1
- Specifies the speed of the carousel animation.
- StartAt Nullable`1
- Specifies the index of the slide to start at.