Here Are the Steps to the Video:
Creating the First Section of the Accordion
Grab a new container and drag it on to your website canvas. Rename this container “Accordion” in the Page Structure Panel to make identifying it easier. You will also need to:
- Add 30px of margin to the top of Accordion container.
- Give Accordion container a 900px width in the Dimensions Panel.
Drag a new container into Accordion container and rename it “Outer 1”.
- In the Border Panel (formerly the Stroke Panel) select “underline border”.
Drag a Grid Element and place it into Outer 1 container.
- Collapse one column of the grid by dragging the column next to another column (or the side of the grid) and releasing your mouse button.
- Move the remaining column to the right so the opening is at the second smallest preset width.
- Give the grid a white background fill color using the Color Panel.
Drag a Text Element into the left side of the grid.
- Inside the text element, input the text “Accordion One”.
- Assign the text an h2 value (see Global Styles for more information on heading values).
- Add 14px top padding, make the text element height: 60px.
Drag an Image Element into the right side of the grid.
- Make the image element align right, using the Alignment Panel.
- Open the Media Library and drag in an arrow icon.
- In the Dimensions Panel, make the image element 60px wide.
Drag the handles on the bottom of the grid and zip it up so the height defaults to the height of the element inside it, “Accordion One”.
Drag a new container and place it below the grid.
- Rename this container “Accordion 1 Contents” in the Page Structure Panel to make identifying it easier.
- Drag a new text element into Accordion 1 Contents.
- Paste in filler text (this will be text that is hidden from view but appears with a command) and assign it an h4 value.
- Add 10px bottom padding and grab the bottom of the text container to zip up.
Duplicating Multiple Accordions
Select Outer 1 in the Page Structure Panel and use Alt + Drag to duplicate it and place it underneath the original.
- Rename it “Outer 2”.
- Change “Accordion One” to “Accordion Two” for the heading text.
- Rename “Accordion 1 Contents” to “Accordion 2 Contents”
- Paste in filler text (this will be text that is hidden from view but appears with a command) into the text box.
- Grab the bottom of Outer 2 container and zip it up (if needed).
Select Outer 2 in the Page Structure Panel and use Alt + Drag to duplicate it abd place it underneath the original.
- Rename it “Outer 3”.
- Change “Accordion Two” to “Accordion Three” for the heading text.
- Rename “Accordion 2 Contents” to “Accordion 3 Contents”
- Paste in answer text (this will be text that is hidden from view but appears with a command) into the text box.
- Grab the bottom of Outer 3 container and zip it up (if needed).
Setting Up the Positioning
- Select Accordion 3 Contents from the Page Structure Panel, from Position Panel select “Fix To Parent Element” from the dropdown menu.
- Also, make the Z Arrange Order: -11.
- Repeat the steps for the remaining accordion content containers, i.e., Accordion 2 Contents and Accordion 1 Contents.
Select Outer 3, and also:
- Make sure the Hide Overflow box is checked in the Dimensions Panel.
- Grab the bottom of the container and zip up Outer 3 (if needed).
- Repeat these steps for Outer 2 and Outer 1.
Making the Interaction
- Select the arrow image for Accordion One row and click the “+” button in the Interactions Panel.
- Name your interaction and click “Submit”.
- Verify that “On Click” and “Toggle” are selected in the dropdown for that interaction.
While in Interaction Mode:
- Open the Transform Panel, and in Rotate field enter: 90 degrees.
- Grab the bottom of Outer 1 container and drag it open.
- Select Accordion 1 Contents and switch its positioning to “Normal Positioning” in the Position Panel.
- Adjust the opening of Outer 1 container so it’s just big enough for the text in Accordion 1 Contents to show.
- Repeat these steps for the remaining Accordion Two and Accordion Three.
- Adjust the Accordion container (the outermost container that has all the contents) accordingly per Device Mode.