Accordion is a list where each item can be expanded or collapsed. Accordion allows you to create easy navigation for pages with a lot of content.

To place an accordion, use the nested div elements:

<div data-block="accordion">
    <div data-block="item" data-title="What is Lorem Ipsum">
    <div data-block="item" data-title="Where does it come from" data-expanded="true">
        <p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.</p>
    <div data-block="item" data-title="Why do we use it">
    <div data-block="item" data-title="Where can I get some">
Copied to clipboard

The attributes of the nested <div data-block="feed-item">:

Attribute Description
data-title * Name of the list item.

Displays the element expanded. Possible values:

  • true — The element is displayed expanded.
  • false — The element is displayed collapsed.

By default, all elements are collapsed.

*Required attribute.