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
83
84
85
<div class="p-16 space-y-12">
<h3 class="text-lg font-semibold mb-6">Dark Variant (default)</h3>
<div class="flex flex-wrap gap-12 items-center">
<div class="relative inline-flex "
data-controller="better-ui--tooltip"
data-better-ui--tooltip-position-value="top"
>
<button class="px-4 py-2 bg-primary-600 text-white rounded-md">
Dark (SM)
</button>
<div class="fixed z-[9999] rounded-md whitespace-nowrap pointer-events-none opacity-0 invisible transition-opacity duration-200 bg-grayscale-900 text-white text-xs px-2 py-1"
role="tooltip"
data-better-ui--tooltip-target="tooltip">
Dark tooltip (sm)
</div>
</div>
<div class="relative inline-flex "
data-controller="better-ui--tooltip"
data-better-ui--tooltip-position-value="top"
>
<button class="px-4 py-2 bg-primary-600 text-white rounded-md">
Dark (MD)
</button>
<div class="fixed z-[9999] rounded-md whitespace-nowrap pointer-events-none opacity-0 invisible transition-opacity duration-200 bg-grayscale-900 text-white text-sm px-3 py-1.5"
role="tooltip"
data-better-ui--tooltip-target="tooltip">
Dark tooltip (md)
</div>
</div>
</div>
<h3 class="text-lg font-semibold mb-6 mt-12">Light Variant</h3>
<div class="flex flex-wrap gap-12 items-center">
<div class="relative inline-flex "
data-controller="better-ui--tooltip"
data-better-ui--tooltip-position-value="top"
>
<button class="px-4 py-2 bg-grayscale-200 text-grayscale-900 rounded-md">
Light (SM)
</button>
<div class="fixed z-[9999] rounded-md whitespace-nowrap pointer-events-none opacity-0 invisible transition-opacity duration-200 bg-white text-grayscale-900 border border-grayscale-200 shadow-lg text-xs px-2 py-1"
role="tooltip"
data-better-ui--tooltip-target="tooltip">
Light tooltip (sm)
</div>
</div>
<div class="relative inline-flex "
data-controller="better-ui--tooltip"
data-better-ui--tooltip-position-value="top"
>
<button class="px-4 py-2 bg-grayscale-200 text-grayscale-900 rounded-md">
Light (MD)
</button>
<div class="fixed z-[9999] rounded-md whitespace-nowrap pointer-events-none opacity-0 invisible transition-opacity duration-200 bg-white text-grayscale-900 border border-grayscale-200 shadow-lg text-sm px-3 py-1.5"
role="tooltip"
data-better-ui--tooltip-target="tooltip">
Light tooltip (md)
</div>
</div>
</div>
<h3 class="text-lg font-semibold mb-6 mt-12">Sizes Comparison</h3>
<div class="flex flex-wrap gap-12 items-center">
<div class="relative inline-flex "
data-controller="better-ui--tooltip"
data-better-ui--tooltip-position-value="top"
>
<button class="px-4 py-2 bg-primary-600 text-white rounded-md">Small (SM)</button>
<div class="fixed z-[9999] rounded-md whitespace-nowrap pointer-events-none opacity-0 invisible transition-opacity duration-200 bg-grayscale-900 text-white text-xs px-2 py-1"
role="tooltip"
data-better-ui--tooltip-target="tooltip">
Small tooltip
</div>
</div>
<div class="relative inline-flex "
data-controller="better-ui--tooltip"
data-better-ui--tooltip-position-value="top"
>
<button class="px-4 py-2 bg-primary-600 text-white rounded-md">Medium (MD)</button>
<div class="fixed z-[9999] rounded-md whitespace-nowrap pointer-events-none opacity-0 invisible transition-opacity duration-200 bg-grayscale-900 text-white text-sm px-3 py-1.5"
role="tooltip"
data-better-ui--tooltip-target="tooltip">
Medium tooltip
</div>
</div>
</div>
</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
36
37
<div class="p-16 space-y-12">
<h3 class="text-lg font-semibold mb-6">Dark Variant (default)</h3>
<div class="flex flex-wrap gap-12 items-center">
<% %i[sm md].each do |size| %>
<%= render BetterUi::TooltipComponent.new(text: "Dark tooltip (#{size})", variant: :dark, size: size) do %>
<button class="px-4 py-2 bg-primary-600 text-white rounded-md">
Dark (<%= size.to_s.upcase %>)
</button>
<% end %>
<% end %>
</div>
<h3 class="text-lg font-semibold mb-6 mt-12">Light Variant</h3>
<div class="flex flex-wrap gap-12 items-center">
<% %i[sm md].each do |size| %>
<%= render BetterUi::TooltipComponent.new(text: "Light tooltip (#{size})", variant: :light, size: size) do %>
<button class="px-4 py-2 bg-grayscale-200 text-grayscale-900 rounded-md">
Light (<%= size.to_s.upcase %>)
</button>
<% end %>
<% end %>
</div>
<h3 class="text-lg font-semibold mb-6 mt-12">Sizes Comparison</h3>
<div class="flex flex-wrap gap-12 items-center">
<%= render BetterUi::TooltipComponent.new(text: "Small tooltip", size: :sm) do %>
<button class="px-4 py-2 bg-primary-600 text-white rounded-md">Small (SM)</button>
<% end %>
<%= render BetterUi::TooltipComponent.new(text: "Medium tooltip", size: :md) do %>
<button class="px-4 py-2 bg-primary-600 text-white rounded-md">Medium (MD)</button>
<% end %>
</div>
</div>