Previews

No matching results.

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
<div class="flex items-center gap-8 p-16">
<span class="midwest-tooltip" data-controller="midwest-tooltip">
<span id="tooltip-trigger-12580" class="midwest-tooltip-trigger" style="anchor-name: --tooltip-12580" data-action="mouseenter->midwest-tooltip#show mouseleave->midwest-tooltip#hide focus->midwest-tooltip#show blur->midwest-tooltip#hide" aria-describedby="tooltip-12580">
<span role="button" tabindex="0" class="midwest-button variant-default size-default theme-primary" name="button">
<span class="midwest-button-content">No delay</span>
<div class="midwest-loading-icon" role="img" aria-label="Loading" aria-hidden="true" style="display: none">
<div class="midwest-loading-icon-inner">
<!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL -->
<svg viewbox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="Midwest-LoadingIcon__Svg" focusable="false" aria-hidden="true">
<circle cx="15" cy="15" r="15">
<animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate>
<animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate>
</circle>
<circle cx="60" cy="15" r="9" fill-opacity="0.3">
<animate attributename="r" from="9" to="9" begin="0s" dur="0.8s" values="9;15;9" calcmode="linear" repeatcount="indefinite"></animate>
<animate attributename="fill-opacity" from="0.5" to="0.5" begin="0s" dur="0.8s" values=".5;1;.5" calcmode="linear" repeatcount="indefinite"></animate>
</circle>
<circle cx="105" cy="15" r="15">
<animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate>
<animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate>
</circle>
</svg>
</div>
</div>
</span>
</span> <span id="tooltip-12580" popover="manual" role="tooltip" class="midwest-tooltip-popover placement-top" style="position-anchor: --tooltip-12580" data-midwest-tooltip-target="popover">
Appears immediately
</span></span>
<span class="midwest-tooltip" data-controller="midwest-tooltip" data-midwest-tooltip-delay-value="300">
<span id="tooltip-trigger-12588" class="midwest-tooltip-trigger" style="anchor-name: --tooltip-12588" data-action="mouseenter->midwest-tooltip#show mouseleave->midwest-tooltip#hide focus->midwest-tooltip#show blur->midwest-tooltip#hide" aria-describedby="tooltip-12588">
<span role="button" tabindex="0" class="midwest-button variant-default size-default theme-primary" name="button">
<span class="midwest-button-content">300 ms delay</span>
<div class="midwest-loading-icon" role="img" aria-label="Loading" aria-hidden="true" style="display: none">
<div class="midwest-loading-icon-inner">
<!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL -->
<svg viewbox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="Midwest-LoadingIcon__Svg" focusable="false" aria-hidden="true">
<circle cx="15" cy="15" r="15">
<animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate>
<animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate>
</circle>
<circle cx="60" cy="15" r="9" fill-opacity="0.3">
<animate attributename="r" from="9" to="9" begin="0s" dur="0.8s" values="9;15;9" calcmode="linear" repeatcount="indefinite"></animate>
<animate attributename="fill-opacity" from="0.5" to="0.5" begin="0s" dur="0.8s" values=".5;1;.5" calcmode="linear" repeatcount="indefinite"></animate>
</circle>
<circle cx="105" cy="15" r="15">
<animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate>
<animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate>
</circle>
</svg>
</div>
</div>
</span>
</span> <span id="tooltip-12588" popover="manual" role="tooltip" class="midwest-tooltip-popover placement-top" style="position-anchor: --tooltip-12588" data-midwest-tooltip-target="popover">
Appears after 300 ms
</span></span>
<span class="midwest-tooltip" data-controller="midwest-tooltip" data-midwest-tooltip-delay-value="700">
<span id="tooltip-trigger-12590" class="midwest-tooltip-trigger" style="anchor-name: --tooltip-12590" data-action="mouseenter->midwest-tooltip#show mouseleave->midwest-tooltip#hide focus->midwest-tooltip#show blur->midwest-tooltip#hide" aria-describedby="tooltip-12590">
<span role="button" tabindex="0" class="midwest-button variant-default size-default theme-primary" name="button">
<span class="midwest-button-content">700 ms delay</span>
<div class="midwest-loading-icon" role="img" aria-label="Loading" aria-hidden="true" style="display: none">
<div class="midwest-loading-icon-inner">
<!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL -->
<svg viewbox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="Midwest-LoadingIcon__Svg" focusable="false" aria-hidden="true">
<circle cx="15" cy="15" r="15">
<animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate>
<animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate>
</circle>
<circle cx="60" cy="15" r="9" fill-opacity="0.3">
<animate attributename="r" from="9" to="9" begin="0s" dur="0.8s" values="9;15;9" calcmode="linear" repeatcount="indefinite"></animate>
<animate attributename="fill-opacity" from="0.5" to="0.5" begin="0s" dur="0.8s" values=".5;1;.5" calcmode="linear" repeatcount="indefinite"></animate>
</circle>
<circle cx="105" cy="15" r="15">
<animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate>
<animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate>
</circle>
</svg>
</div>
</div>
</span>
</span> <span id="tooltip-12590" popover="manual" role="tooltip" class="midwest-tooltip-popover placement-top" style="position-anchor: --tooltip-12590" data-midwest-tooltip-target="popover">
Appears after 700 ms
</span></span></div>
1
2
3
4
5
6
7
8
9
10
11
12
13
<div class="flex items-center gap-8 p-16">
<%= render Midwest::TooltipComponent.new(tip: 'Appears immediately', placement: :top) do %>
<%= midwest_button('No delay', as: :span) %>
<% end %>
<%= render Midwest::TooltipComponent.new(tip: 'Appears after 300 ms', placement: :top, delay: 300) do %>
<%= midwest_button('300 ms delay', as: :span) %>
<% end %>
<%= render Midwest::TooltipComponent.new(tip: 'Appears after 700 ms', placement: :top, delay: 700) do %>
<%= midwest_button('700 ms delay', as: :span) %>
<% end %>
</div>

No assets to display.
Add a .js or .css file alongside the component to see it here.

Accessibility

Figma embed for Tooltip/delay

Annotate a preview to embed its Figma design here:

@figma "https://figma.com/..."