-
Notifications
You must be signed in to change notification settings - Fork 0
/
tooltip.html
256 lines (254 loc) · 11 KB
/
tooltip.html
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="tailwind_theme/tailwind.css" rel="stylesheet" type="text/css" />
<title>Flowbite Accordions</title>
</head>
<body>
<header>
<div
class="flex items-center w-full px-10 mx-auto bg-white dark:bg-gray-900"
>
<h1 class="text-3xl text-gray-900 dark:text-white">
Flowbite Components
</h1>
</div>
</header>
<section
class="flex flex-col items-center w-full px-5 mx-auto bg-gray-100 dark:bg-gray-900"
>
<div class="flex flex-col items-center gap-3 mb-2">
<h2 class="text-3xl text-gray-900 dark:text-white">Alerts</h2>
<h3 class="text-2xl text-gray-900 dark:text-white">Default tooltip</h3>
</div>
<div class="flowbite">
<button
data-tooltip-target="tooltip-default"
type="button"
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
Default tooltip
</button>
<div
id="tooltip-default"
role="tooltip"
class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"
>
Tooltip content
<div class="tooltip-arrow" data-popper-arrow></div>
</div>
</div>
<div class="flex flex-col items-center gap-1 my-10">
<h3 class="text-2xl text-gray-900 dark:text-white">Tooltip styles</h3>
</div>
<div class="flex flex-col gap-3">
<div class="flowbite">
<!-- Light style tooltip -->
<button
data-tooltip-target="tooltip-light"
data-tooltip-style="light"
type="button"
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
Light tooltip
</button>
<div
id="tooltip-light"
role="tooltip"
class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-lg shadow-sm opacity-0 tooltip"
>
Tooltip content
<div class="tooltip-arrow" data-popper-arrow></div>
</div>
</div>
<div class="flowbite">
<!-- Dark style tooltip -->
<button
data-tooltip-target="tooltip-dark"
type="button"
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
Dark tooltip
</button>
<div
id="tooltip-dark"
role="tooltip"
class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"
>
Tooltip content
<div class="tooltip-arrow" data-popper-arrow></div>
</div>
</div>
</div>
<div class="flex flex-col items-center gap-1 my-10">
<h3 class="text-2xl text-gray-900 dark:text-white">Placement</h3>
</div>
<div class="flex flex-col gap-3">
<div class="flowbite">
<!-- Show tooltip on top -->
<button
data-tooltip-target="tooltip-top"
data-tooltip-placement="top"
type="button"
class="mb-2 md:mb-0 text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
Tooltip top
</button>
<div
id="tooltip-top"
role="tooltip"
class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"
>
Tooltip on top
<div class="tooltip-arrow" data-popper-arrow></div>
</div>
</div>
<div class="flowbite">
<!-- Show tooltip on right -->
<button
data-tooltip-target="tooltip-right"
data-tooltip-placement="right"
type="button"
class="mb-2 md:mb-0 text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
Tooltip right
</button>
<div
id="tooltip-right"
role="tooltip"
class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"
>
Tooltip on right
<div class="tooltip-arrow" data-popper-arrow></div>
</div>
</div>
<div class="flowbite">
<!-- Show tooltip on bottom -->
<button
data-tooltip-target="tooltip-bottom"
data-tooltip-placement="bottom"
type="button"
class="mb-2 md:mb-0 text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
Tooltip bottom
</button>
<div
id="tooltip-bottom"
role="tooltip"
class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"
>
Tooltip on bottom
<div class="tooltip-arrow" data-popper-arrow></div>
</div>
</div>
<div class="flowbite">
<!-- Show tooltip on left -->
<button
data-tooltip-target="tooltip-left"
data-tooltip-placement="left"
type="button"
class="mb-2 md:mb-0 text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
Tooltip left
</button>
<div
id="tooltip-left"
role="tooltip"
class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"
>
Tooltip on left
<div class="tooltip-arrow" data-popper-arrow></div>
</div>
</div>
</div>
<div class="flex flex-col items-center gap-1 my-10">
<h3 class="text-2xl text-gray-900 dark:text-white">Triggering</h3>
</div>
<div class="flex flex-col gap-3">
<div class="flowbite">
<!-- Show tooltip on hover -->
<button
data-tooltip-target="tooltip-hover"
data-tooltip-trigger="hover"
type="button"
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
Tooltip hover
</button>
<div
id="tooltip-hover"
role="tooltip"
class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"
>
Tooltip content
<div class="tooltip-arrow" data-popper-arrow></div>
</div>
</div>
<div class="flowbite">
<!-- Show tooltip on click -->
<button
data-tooltip-target="tooltip-click"
data-tooltip-trigger="click"
type="button"
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
Tooltip click
</button>
<div
id="tooltip-click"
role="tooltip"
class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"
>
Tooltip content
<div class="tooltip-arrow" data-popper-arrow></div>
</div>
</div>
</div>
<div class="flex flex-col items-center gap-1 my-10">
<h3 class="text-2xl text-gray-900 dark:text-white">Animation</h3>
</div>
<div class="flowbite">
<button
data-tooltip-target="tooltip-animation"
type="button"
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
Animated tooltip
</button>
<div
id="tooltip-animation"
role="tooltip"
class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"
>
Tooltip content
<div class="tooltip-arrow" data-popper-arrow></div>
</div>
</div>
<div class="flex flex-col items-center gap-1 my-10">
<h3 class="text-2xl text-gray-900 dark:text-white">Disable Arrow</h3>
</div>
<div class="flowbite">
<button
data-tooltip-target="tooltip-no-arrow"
type="button"
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
Default tooltip
</button>
<div
id="tooltip-no-arrow"
role="tooltip"
class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"
>
Tooltip content
</div>
</div>
</section>
<script src="./node_modules/flowbite/dist/flowbite.js"></script>
</body>
</html>
<!--<div class="flex flex-col gap-3"></div>
<script src="./node_modules/flowbite/dist/flowbite.js"></script> -->