Accordion content type allows users to add accessible accordions to their sites. Accordion is fully responsive and works great on smaller screens as well as on desktops.
Below is the Accordion which we are going to create in this tutorial:
When to use the Accordion
The Accordion content type can be used for presenting text when there is a limited amount of vertical space. The content inside Accordion is shown in collapsible panels with a title. Each panel expands by clicking on the title.
The topic is berries. In this tutorial, we are going to create the Accordion mentioned in the above example with four types of berries.
Step 2: Creating an Accordion
Select the New content option and choose Accordion from the list of Content types:
Step 3: Accordion Editor
The Accordion editor should now appear and it looks like this:
Step 4: Title
Type the following text in the Title field: Types of berries
Step 5: Panels
Here, we'll add the panels that the Accordion consists of. We'll add four panels
- Blackberries and
- Açaí berries
1st panel is added by default. It consists of a title and text. Fill in:
Text: As raw fruit, sweet cherries provide little nutrient content per 100 g serving. Dietary fiber and vitamin C are present in the most significant content while other vitamins and dietary minerals each supply less than 10% of the Daily Value per serving, respectively. Source: Wikipedia
Add new panel using the "Add panel" button. Fill in the next three panels with the following:
Text: Raw cranberries have moderate levels of vitamin C, dietary fiber and the essential dietary mineral, manganese, as well as other essential micronutrients in minor amounts. Source: Wikipedia
Text: American cultivated blackberries are notable for their significant contents of dietary fiber, vitamin C, and vitamin K. Source: Wikipedia
Title: Açaí berries
Text: A powdered preparation of freeze-dried açaí fruit pulp and skin was reported to contain 533.9 calories, 52.2 g carbohydrates, 8.1 g protein, and 32.5 g total fat. The carbohydrate portion included 44.2 g of dietary fiber and low sugar value. Source: Wikipedia
Step 6: Finishing up
Save the node/article to view your finished Accordion.
You should now have a similar result as the example on top of this page.
Feel free to leave any comments or suggestions on how to improve this tutorial.