Skip to content

Accordion - CSS Component

The Accordion component can be used imported from:

Playground

Construction

The CSS component uses the <section> tag with the z-accordion HTML custom attribute.

z-accordion

The z-accordion is the main parameter used to render the accordion component.

Accordion item
Body text lorem ipsum dolor sit amet

You can also set the size of the accordion item. Default is m. You can also set it as l.

Accordion item
Body text lorem ipsum dolor sit amet

borderless

The borderless parameter is used to remove the border from the accordion item.

Accordion item
Body text lorem ipsum dolor sit amet

INFO

The open attribute for the detailstag is a boolean attribute. When present, it specifies that the details should be visible (open) to the user. The default value is false.

Accordion item
Body text lorem ipsum dolor sit amet

Check all information about the details tag in here.

Browser support

Detected engine:  

  • Chromium

  • Webkit

  • Gecko

HTML Examples

CodeSandbox example