x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<div class="midwest-accordion"> <details name="accordion-f010" class="midwest-accordion-item"> <summary class="accordion-trigger"> <span class="accordion-title">Getting Started</span> <span class="accordion-chevron" aria-hidden="true"> <div class="midwest-icon "> <div class="midwest-icon-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" role="img" aria-label="Chevron down"><title>Chevron down</title> <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M112 184l144 144 144-144"></path></svg> </div> </div> </span> </summary> <div class="accordion-panel"> <p>Expand the sub-topics below for more detail.</p> <div class="midwest-accordion"> <details class="midwest-accordion-item"> <summary class="accordion-trigger"> <span class="accordion-title">Installation</span> <span class="accordion-chevron" aria-hidden="true"> <div class="midwest-icon "> <div class="midwest-icon-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" role="img" aria-label="Chevron down"><title>Chevron down</title> <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M112 184l144 144 144-144"></path></svg> </div> </div> </span> </summary> <div class="accordion-panel"> <p>Run <code>bundle add midwest</code> to install the gem.</p> </div> </details> <details class="midwest-accordion-item"> <summary class="accordion-trigger"> <span class="accordion-title">Configuration</span> <span class="accordion-chevron" aria-hidden="true"> <div class="midwest-icon "> <div class="midwest-icon-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" role="img" aria-label="Chevron down"><title>Chevron down</title> <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M112 184l144 144 144-144"></path></svg> </div> </div> </span> </summary> <div class="accordion-panel"> <p>Add the engine to your routes and import the stylesheet.</p> </div> </details> </div> </div> </details> <details name="accordion-f010" class="midwest-accordion-item"> <summary class="accordion-trigger"> <span class="accordion-title">Components</span> <span class="accordion-chevron" aria-hidden="true"> <div class="midwest-icon "> <div class="midwest-icon-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" role="img" aria-label="Chevron down"><title>Chevron down</title> <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M112 184l144 144 144-144"></path></svg> </div> </div> </span> </summary> <div class="accordion-panel"> <p>Browse the component library in Lookbook.</p> </div> </details> <details name="accordion-f010" class="midwest-accordion-item"> <summary class="accordion-trigger"> <span class="accordion-title">Customization</span> <span class="accordion-chevron" aria-hidden="true"> <div class="midwest-icon "> <div class="midwest-icon-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" role="img" aria-label="Chevron down"><title>Chevron down</title> <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M112 184l144 144 144-144"></path></svg> </div> </div> </span> </summary> <div class="accordion-panel"> <p>Override CSS custom properties to match your brand.</p> </div> </details></div>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<%= midwest_accordion do |a| %> <% a.with_item "Getting Started" do %> <p>Expand the sub-topics below for more detail.</p> <%= midwest_accordion multiple: true do |nested| %> <% nested.with_item "Installation" do %> <p>Run <code>bundle add midwest</code> to install the gem.</p> <% end %> <% nested.with_item "Configuration" do %> <p>Add the engine to your routes and import the stylesheet.</p> <% end %> <% end %> <% end %> <% a.with_item "Components" do %> <p>Browse the component library in Lookbook.</p> <% end %> <% a.with_item "Customization" do %> <p>Override CSS custom properties to match your brand.</p> <% end %><% end %>Nested
An accordion inside an accordion item. The inner accordion resets its border and background so it reads as a sub-level of the parent.
No params configured.
No assets to display.
Add a .js or .css file alongside the component to see it here.
Figma embed for Accordion/nested
Annotate a preview to embed its Figma design here:
@figma "https://figma.com/..."