Docs

Documentation versions (currently viewingVaadin 25 (prerelease))

Accordion Styling

Styling API reference for the Accordion component.

Style Variants

Accordion supports the following style variants. Variants must be applied to individual panels, not to the Accordion itself.

Variant Description Supported by

filled

Makes the panel’s boundaries visible

Aura, Lumo

no-padding

Removes the padding from the panel content area

Aura

small

Used for compact UIs

Lumo

reverse

Places the toggle icon after the summary contents

Aura, Lumo

Filled Panels

The filled style variant makes the panel’s boundaries visible. This helps tie its content together visually and distinguishes it from the surrounding UI.

Source code
AccordionFilledPanels.java
accordion-filled-panels.tsx
accordion-filled-panels.ts

Small Panels

Use the small style variant for compact UIs.

Source code
AccordionSmallPanels.java
accordion-small-panels.tsx
accordion-small-panels.ts

Reverse Panels

The reverse style variant places the toggle icon after the summary contents. This can be useful for aligning visually the summary with other content.

Source code
AccordionReversePanels.java
accordion-reverse-panels.tsx
accordion-reverse-panels.ts

CSS Selectors

The following CSS selectors can be used in stylesheets to target the various parts and states of the component. See the Styling documentation for more details on how to style components.

Root element

vaadin-accordion

Panels

Panel element

vaadin-accordion-panel

Opened panel

vaadin-accordion-panel[opened]

Disabled panel

vaadin-accordion-panel[disabled]

Panel body content wrapper

vaadin-accordion-panel::part(content)

Panel Heading

Heading element

vaadin-accordion-heading

Toggle

vaadin-accordion-heading::part(toggle)

Toggle icon

vaadin-accordion-heading::part(toggle)::before

Panel header content wrapper

vaadin-accordion-heading::part(content)