# New-AccordionItem

Creates a new accordion item with specified header text and panel text.

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 accordion item with specified header text and panel text.

## Syntax

```
New-AccordionItem
[[-HeaderAlign] <String>]
[[-HeaderText] <String>]
[[-PanelText] <String>]
[<CommonParameters>]
```

[#](#method-new-accordionitem-string-string-string)

Parameter set: `All Parameter Sets`

## Description

This function creates a new accordion item with the provided header text and panel text. The header text is displayed as a clickable button to toggle the visibility of the panel text.

## Examples

### Example 1

```powershell
New-AccordionItem -HeaderText "Header 1" -HeaderAlign "left" -PanelText "Panel 1 Text"
```

Creates a new accordion item with the header text "Header 1" aligned to the left and panel text "Panel 1 Text".

### Example 2

```powershell
New-AccordionItem -HeaderText "Header 2" -HeaderAlign "center" -PanelText "Panel 2 Text"
```

Creates a new accordion item with the header text "Header 2" aligned to the center and panel text "Panel 2 Text".

## Parameters

**-HeaderAlign String optionalposition: 1**

The alignment of the header text. Accepted values are 'left', 'center', or 'right'.

**-HeaderText String optionalposition: 0**

The text to be displayed as the header of the accordion item.

**-PanelText String optionalposition: 2**

The text to be displayed in the panel of the accordion item.

## 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:17B74241140FA0E92AB38CF93450ADF1544D1938A0E7CFB0228A70508347F5CE -->
