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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<div class="flex flex-col gap-6 p-6"> <table class="w-full text-sm border-collapse"> <thead> <tr class="border-b border-gray-2"> <th class="text-left py-2 pr-4 font-semibold text-gray-5">Model</th> <th class="text-left py-2 pr-4 font-semibold text-gray-5">Icon</th> <th class="text-left py-2 font-semibold text-gray-5">Breadcrumb</th> </tr> </thead> <tbody> <tr class="border-b border-gray-1"> <td class="py-3 pr-4 font-mono text-xs text-gray-7">Content (declares icon)</td> <td class="py-3 pr-4"> <div class="flex items-center gap-2"> <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="Documents outline"><title>Documents outline</title> <path d="M336 264.13V436c0 24.3-19.05 44-42.95 44H107c-23.95 0-43-19.7-43-44V172a44.26 44.26 0 0144-44h94.12a24.55 24.55 0 0117.49 7.36l109.15 111a25.4 25.4 0 017.24 17.77z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></path><path d="M200 128v108a28.34 28.34 0 0028 28h108" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path><path d="M176 128V76a44.26 44.26 0 0144-44h94a24.83 24.83 0 0117.61 7.36l109.15 111A25.09 25.09 0 01448 168v172c0 24.3-19.05 44-42.95 44H344" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></path><path d="M312 32v108a28.34 28.34 0 0028 28h108" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path></svg> </div> </div> <span class="font-mono text-xs text-gray-5">documents-outline</span> </div> </td> <td class="py-3"> <nav class="midwest-breadcrumbs style-inline" aria-label="Breadcrumb"> <ol class="breadcrumbs-list"> <li class="breadcrumb-item"> <span class="midwest-breadcrumb variant-default current has-icon" aria-current="page"> <div class="midwest-icon " aria-hidden="true"> <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="Documents outline"><title>Documents outline</title> <path d="M336 264.13V436c0 24.3-19.05 44-42.95 44H107c-23.95 0-43-19.7-43-44V172a44.26 44.26 0 0144-44h94.12a24.55 24.55 0 0117.49 7.36l109.15 111a25.4 25.4 0 017.24 17.77z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></path><path d="M200 128v108a28.34 28.34 0 0028 28h108" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path><path d="M176 128V76a44.26 44.26 0 0144-44h94a24.83 24.83 0 0117.61 7.36l109.15 111A25.09 25.09 0 01448 168v172c0 24.3-19.05 44-42.95 44H344" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></path><path d="M312 32v108a28.34 28.34 0 0028 28h108" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path></svg> </div> </div> <span class="midwest-label "> Contents </span> </span> </li> </ol> </nav> </td> </tr> <tr class="border-b border-gray-1"> <td class="py-3 pr-4 font-mono text-xs text-gray-7">Article (inherits from Content)</td> <td class="py-3 pr-4"> <div class="flex items-center gap-2"> <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="Documents outline"><title>Documents outline</title> <path d="M336 264.13V436c0 24.3-19.05 44-42.95 44H107c-23.95 0-43-19.7-43-44V172a44.26 44.26 0 0144-44h94.12a24.55 24.55 0 0117.49 7.36l109.15 111a25.4 25.4 0 017.24 17.77z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></path><path d="M200 128v108a28.34 28.34 0 0028 28h108" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path><path d="M176 128V76a44.26 44.26 0 0144-44h94a24.83 24.83 0 0117.61 7.36l109.15 111A25.09 25.09 0 01448 168v172c0 24.3-19.05 44-42.95 44H344" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></path><path d="M312 32v108a28.34 28.34 0 0028 28h108" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path></svg> </div> </div> <span class="font-mono text-xs text-gray-5">documents-outline</span> </div> </td> <td class="py-3"> <nav class="midwest-breadcrumbs style-inline" aria-label="Breadcrumb"> <ol class="breadcrumbs-list"> <li class="breadcrumb-item"> <span class="midwest-breadcrumb variant-default current has-icon" aria-current="page"> <div class="midwest-icon " aria-hidden="true"> <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="Documents outline"><title>Documents outline</title> <path d="M336 264.13V436c0 24.3-19.05 44-42.95 44H107c-23.95 0-43-19.7-43-44V172a44.26 44.26 0 0144-44h94.12a24.55 24.55 0 0117.49 7.36l109.15 111a25.4 25.4 0 017.24 17.77z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></path><path d="M200 128v108a28.34 28.34 0 0028 28h108" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path><path d="M176 128V76a44.26 44.26 0 0144-44h94a24.83 24.83 0 0117.61 7.36l109.15 111A25.09 25.09 0 01448 168v172c0 24.3-19.05 44-42.95 44H344" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></path><path d="M312 32v108a28.34 28.34 0 0028 28h108" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path></svg> </div> </div> <span class="midwest-label "> Articles </span> </span> </li> </ol> </nav> </td> </tr> <tr class="border-b border-gray-1"> <td class="py-3 pr-4 font-mono text-xs text-gray-7">Draft (overrides icon)</td> <td class="py-3 pr-4"> <div class="flex items-center gap-2"> <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="Document outline"><title>Document outline</title> <path d="M416 221.25V416a48 48 0 01-48 48H144a48 48 0 01-48-48V96a48 48 0 0148-48h98.75a32 32 0 0122.62 9.37l141.26 141.26a32 32 0 019.37 22.62z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></path><path d="M256 56v120a32 32 0 0032 32h120" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path></svg> </div> </div> <span class="font-mono text-xs text-gray-5">document-outline</span> </div> </td> <td class="py-3"> <nav class="midwest-breadcrumbs style-inline" aria-label="Breadcrumb"> <ol class="breadcrumbs-list"> <li class="breadcrumb-item"> <span class="midwest-breadcrumb variant-default current has-icon" aria-current="page"> <div class="midwest-icon " aria-hidden="true"> <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="Document outline"><title>Document outline</title> <path d="M416 221.25V416a48 48 0 01-48 48H144a48 48 0 01-48-48V96a48 48 0 0148-48h98.75a32 32 0 0122.62 9.37l141.26 141.26a32 32 0 019.37 22.62z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></path><path d="M256 56v120a32 32 0 0032 32h120" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></path></svg> </div> </div> <span class="midwest-label "> Drafts </span> </span> </li> </ol> </nav> </td> </tr> </tbody> </table></div>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
<div class="flex flex-col gap-6 p-6"> <% rows = [ { label: 'Content (declares icon)', klass: base_class, expected: :'documents-outline' }, { label: 'Article (inherits from Content)', klass: child_class, expected: :'documents-outline' }, { label: 'Draft (overrides icon)', klass: override_class, expected: :'document-outline' }, ] %> <table class="w-full text-sm border-collapse"> <thead> <tr class="border-b border-gray-2"> <th class="text-left py-2 pr-4 font-semibold text-gray-5">Model</th> <th class="text-left py-2 pr-4 font-semibold text-gray-5">Icon</th> <th class="text-left py-2 font-semibold text-gray-5">Breadcrumb</th> </tr> </thead> <tbody> <% rows.each do |row| %> <tr class="border-b border-gray-1"> <td class="py-3 pr-4 font-mono text-xs text-gray-7"><%= row[:label] %></td> <td class="py-3 pr-4"> <div class="flex items-center gap-2"> <%= midwest_icon(row[:klass].icon) %> <span class="font-mono text-xs text-gray-5"><%= row[:klass].icon %></span> </div> </td> <td class="py-3"> <%= midwest_breadcrumbs(row[:klass]) %> </td> </tr> <% end %> </tbody> </table></div>Inheritance
Subclasses inherit the parent's icon unless they declare their own. Override at any level in the hierarchy without affecting siblings.
No params configured.
No assets to display.
Add a .js or .css file alongside the component to see it here.
Figma embed for Iconable/inheritance
Annotate a preview to embed its Figma design here:
@figma "https://figma.com/..."