flowbite-mcp 1.1.2 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +49 -74
  2. package/build/index.js +20 -36
  3. package/data/components/accordion.md +39 -53
  4. package/data/components/alerts.md +27 -44
  5. package/data/components/avatar.md +20 -33
  6. package/data/components/badge.md +34 -47
  7. package/data/components/banner.md +10 -29
  8. package/data/components/bottom-navigation.md +16 -29
  9. package/data/components/breadcrumb.md +12 -25
  10. package/data/components/button-group.md +26 -39
  11. package/data/components/buttons.md +41 -67
  12. package/data/components/card.md +34 -47
  13. package/data/components/carousel.md +25 -39
  14. package/data/components/chat-bubble.md +36 -50
  15. package/data/components/clipboard.md +256 -252
  16. package/data/components/datepicker.md +56 -70
  17. package/data/components/device-mockups.md +16 -29
  18. package/data/components/drawer.md +42 -56
  19. package/data/components/dropdowns.md +66 -80
  20. package/data/components/footer.md +16 -29
  21. package/data/components/forms.md +32 -50
  22. package/data/components/gallery.md +16 -33
  23. package/data/components/indicators.md +18 -31
  24. package/data/components/jumbotron.md +12 -25
  25. package/data/components/kbd.md +14 -27
  26. package/data/components/list-group.md +14 -27
  27. package/data/components/mega-menu.md +10 -24
  28. package/data/components/modal.md +37 -51
  29. package/data/components/navbar.md +41 -55
  30. package/data/components/pagination.md +22 -35
  31. package/data/components/popover.md +36 -51
  32. package/data/components/progress.md +10 -23
  33. package/data/components/qr-code.md +41 -133
  34. package/data/components/rating.md +16 -29
  35. package/data/components/sidebar.md +15 -30
  36. package/data/components/skeleton.md +16 -29
  37. package/data/components/speed-dial.md +40 -55
  38. package/data/components/spinner.md +14 -27
  39. package/data/components/stepper.md +14 -27
  40. package/data/components/tables.md +45 -64
  41. package/data/components/tabs.md +30 -45
  42. package/data/components/timeline.md +10 -23
  43. package/data/components/toast.md +25 -39
  44. package/data/components/tooltips.md +24 -39
  45. package/data/components/typography.md +22 -35
  46. package/data/components/video.md +14 -27
  47. package/data/forms/checkbox.md +27 -43
  48. package/data/forms/file-input.md +12 -26
  49. package/data/forms/floating-label.md +12 -25
  50. package/data/forms/input-field.md +17 -32
  51. package/data/forms/number-input.md +83 -93
  52. package/data/forms/phone-input.md +42 -54
  53. package/data/forms/radio.md +23 -39
  54. package/data/forms/range.md +12 -26
  55. package/data/forms/search-input.md +14 -31
  56. package/data/forms/select.md +15 -30
  57. package/data/forms/textarea.md +8 -21
  58. package/data/forms/timepicker.md +30 -42
  59. package/data/forms/toggle.md +18 -31
  60. package/data/plugins/charts.md +542 -526
  61. package/data/plugins/datatables.md +285 -286
  62. package/data/plugins/wysiwyg.md +658 -650
  63. package/data/quickstart.md +24 -24
  64. package/data/typography/blockquote.md +24 -37
  65. package/data/typography/headings.md +30 -43
  66. package/data/typography/hr.md +10 -23
  67. package/data/typography/images.md +32 -45
  68. package/data/typography/links.md +16 -29
  69. package/data/typography/lists.md +22 -35
  70. package/data/typography/paragraphs.md +30 -43
  71. package/data/typography/text.md +42 -55
  72. package/package.json +1 -1
@@ -1,16 +1,3 @@
1
- ---
2
- layout: docs
3
- title: Tailwind CSS Skeleton - Flowbite
4
- description: The skeleton component can be used as an alternative loading indicator to the spinner by mimicking the content that will be loaded such as text, images, or video
5
- group: components
6
- toc: true
7
-
8
- previous: Sidebar
9
- previousLink: components/sidebar/
10
- next: Speed Dial
11
- nextLink: components/speed-dial/
12
- ---
13
-
14
1
  Use the skeleton component to indicate a loading status with placeholder elements that look very similar to the type of content that is being loaded such as paragraphs, heading, images, videos, and more.
15
2
 
16
3
  You can set the width and height of these skeleton components based on the size of the content and element that it is being loaded in, such as a card or an article page.
@@ -21,7 +8,7 @@ You can also animate the skeleton component by using the `.animate-pulse` utilit
21
8
 
22
9
  Use this example to show a placeholder when loading text content.
23
10
 
24
- {{< example github="components/skeleton.md" show_dark=true >}}
11
+ ```html
25
12
  <div role="status" class="max-w-sm animate-pulse">
26
13
  <div class="h-2.5 bg-neutral-quaternary rounded-full w-48 mb-4"></div>
27
14
  <div class="h-2 bg-neutral-quaternary rounded-full max-w-[360px] mb-2.5"></div>
@@ -32,13 +19,13 @@ Use this example to show a placeholder when loading text content.
32
19
  <span class="sr-only">Loading...</span>
33
20
  </div>
34
21
 
35
- {{< /example >}}
22
+ ```
36
23
 
37
24
  ## Image placeholder
38
25
 
39
26
  This example can be used to show a placeholder when loading an image and text content.
40
27
 
41
- {{< example github="components/skeleton.md" show_dark=true >}}
28
+ ```html
42
29
  <div role="status" class="space-y-8 animate-pulse md:space-y-0 md:space-x-8 rtl:space-x-reverse md:flex md:items-center">
43
30
  <div class="flex items-center justify-center w-full h-48 bg-neutral-quaternary rounded-base sm:w-96">
44
31
  <svg class="w-11 h-11 text-fg-disabled" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m3 16 5-7 6 6.5m6.5 2.5L16 13l-4.286 6M14 10h.01M4 19h16a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1Z"/></svg>
@@ -54,25 +41,25 @@ This example can be used to show a placeholder when loading an image and text co
54
41
  <span class="sr-only">Loading...</span>
55
42
  </div>
56
43
 
57
- {{< /example >}}
44
+ ```
58
45
 
59
46
  ## Video placeholder
60
47
 
61
48
  Use this example to show a skeleton placeholder when loading video content.
62
49
 
63
- {{< example github="components/skeleton.md" show_dark=true >}}
50
+ ```html
64
51
 
65
52
  <div role="status" class="flex items-center justify-center h-56 max-w-sm bg-neutral-quaternary rounded-base animate-pulse">
66
53
  <svg class="w-11 h-11 text-fg-disabled" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linejoin="round" stroke-width="2" d="M10 3v4a1 1 0 0 1-1 1H5m14-4v16a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V7.914a1 1 0 0 1 .293-.707l3.914-3.914A1 1 0 0 1 9.914 3H18a1 1 0 0 1 1 1ZM9 12h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1Zm5.697 2.395v-.733l1.269-1.219v2.984l-1.268-1.032Z"/></svg>
67
54
  <span class="sr-only">Loading...</span>
68
55
  </div>
69
- {{< /example >}}
56
+ ```
70
57
 
71
58
  ## Text placeholder
72
59
 
73
60
  Use this example to show a placeholder when loading longer pagraphs and headings.
74
61
 
75
- {{< example github="components/skeleton.md" show_dark=true >}}
62
+ ```html
76
63
  <div role="status" class="space-y-2.5 animate-pulse max-w-lg">
77
64
  <div class="flex items-center w-full">
78
65
  <div class="h-2.5 bg-neutral-quaternary rounded-full w-32"></div>
@@ -106,13 +93,13 @@ Use this example to show a placeholder when loading longer pagraphs and headings
106
93
  </div>
107
94
  <span class="sr-only">Loading...</span>
108
95
  </div>
109
- {{< /example >}}
96
+ ```
110
97
 
111
98
  ## Card placeholder
112
99
 
113
100
  Use this example to show a placeholder when loading content inside a card.
114
101
 
115
- {{< example github="components/skeleton.md" show_dark=true >}}
102
+ ```html
116
103
  <div role="status" class="max-w-sm p-4 border border-default rounded-base shadow-xs animate-pulse md:p-6">
117
104
  <div role="status" class="flex items-center justify-center h-48 max-w-sm bg-neutral-quaternary rounded-base animate-pulse mb-4 sm:mb-6">
118
105
  <svg class="w-11 h-11 text-fg-disabled" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linejoin="round" stroke-width="2" d="M10 3v4a1 1 0 0 1-1 1H5m14-4v16a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V7.914a1 1 0 0 1 .293-.707l3.914-3.914A1 1 0 0 1 9.914 3H18a1 1 0 0 1 1 1ZM9 12h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1Zm5.697 2.395v-.733l1.269-1.219v2.984l-1.268-1.032Z"/></svg>
@@ -131,13 +118,13 @@ Use this example to show a placeholder when loading content inside a card.
131
118
  </div>
132
119
  <span class="sr-only">Loading...</span>
133
120
  </div>
134
- {{< /example >}}
121
+ ```
135
122
 
136
123
  ## Widget placeholder
137
124
 
138
125
  This example can be used to show a placeholder of skeleton when fetching data for widgets and cards inside an application.
139
126
 
140
- {{< example github="components/skeleton.md" show_dark=true >}}
127
+ ```html
141
128
  <div role="status" class="max-w-sm p-4 border border-default rounded-base shadow-xs animate-pulse md:p-6">
142
129
  <div class="h-2.5 bg-neutral-quaternary rounded-full w-32 mb-2.5"></div>
143
130
  <div class="w-48 h-2 mb-10 bg-neutral-quaternary rounded-full"></div>
@@ -152,13 +139,13 @@ This example can be used to show a placeholder of skeleton when fetching data fo
152
139
  </div>
153
140
  <span class="sr-only">Loading...</span>
154
141
  </div>
155
- {{< /example >}}
142
+ ```
156
143
 
157
144
  ## List placeholder
158
145
 
159
146
  Use this example to show a placeholder when loading a list of items.
160
147
 
161
- {{< example github="components/skeleton.md" show_dark=true >}}
148
+ ```html
162
149
  <div role="status" class="max-w-md p-4 border border-default divide-y divide-default rounded-base shadow-xs animate-pulse md:p-6">
163
150
  <div class="flex items-center justify-between pb-4">
164
151
  <div>
@@ -197,13 +184,13 @@ Use this example to show a placeholder when loading a list of items.
197
184
  </div>
198
185
  <span class="sr-only">Loading...</span>
199
186
  </div>
200
- {{< /example >}}
187
+ ```
201
188
 
202
189
  ## Testimonial placeholder
203
190
 
204
191
  This example can be used to show a skeleton placeholder when loading data for a testimonial section.
205
192
 
206
- {{< example github="components/skeleton.md" show_dark=true >}}
193
+ ```html
207
194
  <div role="status" class="animate-pulse">
208
195
  <div class="h-2.5 bg-default rounded-full max-w-[640px] mb-2.5 mx-auto"></div>
209
196
  <div class="h-2.5 mx-auto bg-default rounded-full max-w-[540px]"></div>
@@ -214,7 +201,7 @@ This example can be used to show a skeleton placeholder when loading data for a
214
201
  </div>
215
202
  <span class="sr-only">Loading...</span>
216
203
  </div>
217
- {{< /example >}}
204
+ ```
218
205
 
219
206
  ## Accessibility
220
207
 
@@ -1,23 +1,8 @@
1
- ---
2
- layout: docs
3
- title: Tailwind CSS Speed Dial - Flowbite
4
- description: The speed dial component can be used as a quick way to show a list of action buttons to a user when hovering or clicking on the main trigger element.
5
- group: components
6
- toc: true
7
- requires_js: true
8
-
9
- previous: Skeleton
10
- previousLink: components/skeleton/
11
-
12
- next: Spinner
13
- nextLink: components/spinner/
14
- ---
15
-
16
1
  Get started with the speed dial component to show a list of buttons or menu items positioned relative to the body in either corner as a quick way to allow certains actions to be made by your users.
17
2
 
18
3
  This component can be easily customized by changing the colors, text, icons, sizes, alignment, and even positioning using our examples built with Tailwind CSS and making use of Flowbite's JavaScript API.
19
4
 
20
- Make sure that you have the Flowbite JS file included in your application by following our <a href="{{< ref "getting-started/quickstart" >}}">quickstart guide</a>.
5
+ Make sure that you have the Flowbite JS file included in your application by following our quickstart guide.
21
6
 
22
7
  ## Default speed dial
23
8
 
@@ -25,7 +10,7 @@ To initialize a speed dial component you need to wrap the trigger element and th
25
10
 
26
11
  Furthermore, make sure that the trigger button element has the `data-dial-toggle="{targetElementId}"` where the value is the ID of the target element.
27
12
 
28
- {{< example class="flex justify-center pt-24 h-80" github="components/speed-dial.md" show_dark=true >}}
13
+ ```html
29
14
 
30
15
  <div data-dial-init class="fixed end-6 bottom-6 group">
31
16
  <div id="speed-dial-menu-default" class="flex flex-col items-center hidden mb-4 space-y-2">
@@ -67,13 +52,13 @@ Furthermore, make sure that the trigger button element has the `data-dial-toggle
67
52
  <span class="sr-only">Open actions menu</span>
68
53
  </button>
69
54
  </div>
70
- {{< /example >}}
55
+ ```
71
56
 
72
57
  ## Square speed dial
73
58
 
74
59
  Use this example to make the trigger button's style square instead of a full circle using the `rounded-lg` utility class.
75
60
 
76
- {{< example class="flex justify-center pt-24 h-80" github="components/speed-dial.md" show_dark=true >}}
61
+ ```html
77
62
 
78
63
  <div data-dial-init class="fixed end-6 bottom-6 group">
79
64
  <div id="speed-dial-menu-square" class="flex flex-col items-center hidden mb-4 space-y-2">
@@ -115,13 +100,13 @@ Use this example to make the trigger button's style square instead of a full cir
115
100
  <span class="sr-only">Open actions menu</span>
116
101
  </button>
117
102
  </div>
118
- {{< /example >}}
103
+ ```
119
104
 
120
105
  ## Text inside button
121
106
 
122
107
  This example can be used to show the descriptive text inside the button instead of a tooltip.
123
108
 
124
- {{< example class="flex justify-center pt-24 h-80" github="components/speed-dial.md" show_dark=true >}}
109
+ ```html
125
110
 
126
111
  <div data-dial-init class="fixed bottom-6 end-24 group">
127
112
  <div id="speed-dial-menu-text-inside-button" class="flex flex-col items-center hidden mb-4 space-y-2">
@@ -172,13 +157,13 @@ This example can be used to show the descriptive text inside the button instead
172
157
  <span class="sr-only">Open actions menu</span>
173
158
  </button>
174
159
  </div>
175
- {{< /example >}}
160
+ ```
176
161
 
177
162
  ## Text outside button
178
163
 
179
164
  Use this example to show the text of each button outside of the speed dial as an alternative style.
180
165
 
181
- {{< example class="flex justify-center pt-24 h-80" github="components/speed-dial.md" show_dark=true >}}
166
+ ```html
182
167
 
183
168
  <div data-dial-init class="fixed end-6 bottom-6 group">
184
169
  <div id="speed-dial-menu-text-outside-button" class="flex flex-col items-center hidden mb-4 space-y-2">
@@ -229,13 +214,13 @@ Use this example to show the text of each button outside of the speed dial as an
229
214
  <span class="sr-only">Open actions menu</span>
230
215
  </button>
231
216
  </div>
232
- {{< /example >}}
217
+ ```
233
218
 
234
219
  ## Dropdown menu
235
220
 
236
221
  This example can be used to show a list of menu items instead of buttons when activating the speed dial.
237
222
 
238
- {{< example class="flex justify-center pt-24 h-80" github="components/speed-dial.md" show_dark=true >}}
223
+ ```html
239
224
 
240
225
  <div data-dial-init class="fixed bottom-6 right-24 group">
241
226
  <div id="speed-dial-menu-dropdown" class="flex flex-col w-32 justify-end hidden mb-4 space-y-2 bg-neutral-primary-medium border border-default-medium rounded-base shadow-xs">
@@ -306,13 +291,13 @@ This example can be used to show a list of menu items instead of buttons when ac
306
291
  <span class="sr-only">Open actions menu</span>
307
292
  </button>
308
293
  </div>
309
- {{< /example >}}
294
+ ```
310
295
 
311
296
  ## Alternative menu
312
297
 
313
298
  This example can be used to show an alternative style when showing a list of menu items.
314
299
 
315
- {{< example class="flex justify-center pt-24 h-80" github="components/speed-dial.md" show_dark=true >}}
300
+ ```html
316
301
 
317
302
  <div data-dial-init class="fixed bottom-6 right-24 group">
318
303
  <div id="speed-dial-menu-dropdown-alternative" class="flex flex-col w-44 justify-end hidden mb-4 space-y-2 bg-neutral-primary-medium border border-default-medium rounded-base shadow-xs">
@@ -371,7 +356,7 @@ This example can be used to show an alternative style when showing a list of men
371
356
  <span class="sr-only">Open actions menu</span>
372
357
  </button>
373
358
  </div>
374
- {{< /example >}}
359
+ ```
375
360
 
376
361
  ## Positioning
377
362
 
@@ -381,7 +366,7 @@ The positioning of the speed dial component relative to the body element can be
381
366
 
382
367
  Use the `top-{*}` and `right-{*}` utility classes to set the position of the speed dial component to the top right side of the document body.
383
368
 
384
- {{< example class="flex justify-center pt-24 h-80" github="components/speed-dial.md" show_dark=true >}}
369
+ ```html
385
370
 
386
371
  <div data-dial-init class="fixed top-6 end-6 group">
387
372
  <button type="button" data-dial-toggle="speed-dial-menu-top-right" aria-controls="speed-dial-menu-top-right" aria-expanded="false" class="flex items-center justify-center text-white bg-brand rounded-full w-14 h-14 hover:bg-brand-strong focus:ring-4 focus:ring-brand-medium focus:outline-none">
@@ -423,13 +408,13 @@ Use the `top-{*}` and `right-{*}` utility classes to set the position of the spe
423
408
  </div>
424
409
  </div>
425
410
  </div>
426
- {{< /example >}}
411
+ ```
427
412
 
428
413
  ### Bottom right
429
414
 
430
415
  Use the `bottom-{*}` and `right-{*}` utility classes to set the position of the speed dial component to the bottom right side of the document body.
431
416
 
432
- {{< example class="flex justify-center pt-24 h-80" github="components/speed-dial.md" show_dark=true >}}
417
+ ```html
433
418
  <div data-dial-init class="fixed end-6 bottom-6 group">
434
419
  <div id="speed-dial-menu-bottom-right" class="flex flex-col items-center hidden mt-4 space-y-2">
435
420
  <button type="button" data-tooltip-target="tooltip-share" data-tooltip-placement="left" class="flex justify-center items-center w-[52px] h-[52px] text-body hover:text-heading bg-neutral-primary-soft rounded-full border border-default shadow-xs hover:bg-neutral-secondary-medium hover:border-default-medium focus:ring-4 focus:ring-neutral-secondary-soft focus:outline-none">
@@ -470,13 +455,13 @@ Use the `bottom-{*}` and `right-{*}` utility classes to set the position of the
470
455
  <span class="sr-only">Open actions menu</span>
471
456
  </button>
472
457
  </div>
473
- {{< /example >}}
458
+ ```
474
459
 
475
460
  ### Bottom left
476
461
 
477
462
  Use the `bottom-{*}` and `left-{*}` utility classes to set the position of the speed dial component to the bottom left side of the document body.
478
463
 
479
- {{< example class="flex justify-center pt-24 h-80" github="components/speed-dial.md" show_dark=true >}}
464
+ ```html
480
465
  <div data-dial-init class="fixed bottom-6 start-6 group">
481
466
  <div id="speed-dial-menu-bottom-left" class="flex flex-col items-center hidden mt-4 space-y-2">
482
467
  <button type="button" data-tooltip-target="tooltip-share" data-tooltip-placement="left" class="flex justify-center items-center w-[52px] h-[52px] text-body hover:text-heading bg-neutral-primary-soft rounded-full border border-default shadow-xs hover:bg-neutral-secondary-medium hover:border-default-medium focus:ring-4 focus:ring-neutral-secondary-soft focus:outline-none">
@@ -517,13 +502,13 @@ Use the `bottom-{*}` and `left-{*}` utility classes to set the position of the s
517
502
  <span class="sr-only">Open actions menu</span>
518
503
  </button>
519
504
  </div>
520
- {{< /example >}}
505
+ ```
521
506
 
522
507
  ### Top left
523
508
 
524
509
  Use the `top-{*}` and `left-{*}` utility classes to set the position of the speed dial component to the top left side of the document body.
525
510
 
526
- {{< example class="flex justify-center pt-24 h-80" github="components/speed-dial.md" show_dark=true >}}
511
+ ```html
527
512
  <div data-dial-init class="fixed top-6 start-6 group">
528
513
  <button type="button" data-dial-toggle="speed-dial-menu-top-left" aria-controls="speed-dial-menu-top-left" aria-expanded="false" class="flex items-center justify-center text-white bg-brand rounded-full w-14 h-14 hover:bg-brand-strong focus:ring-4 focus:ring-brand-medium focus:outline-none">
529
514
  <svg class="w-5 h-5 transition-transform group-hover:rotate-45" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-7 7V5"/></svg>
@@ -564,7 +549,7 @@ Use the `top-{*}` and `left-{*}` utility classes to set the position of the spee
564
549
  </div>
565
550
  </div>
566
551
  </div>
567
- {{< /example >}}
552
+ ```
568
553
 
569
554
  ## Alignment
570
555
 
@@ -574,7 +559,7 @@ The alignment of the speed dial menu items and buttons can be set using the flex
574
559
 
575
560
  The default alignment of the menu items of the speed dial is vertical using the `flex-col` utility class.
576
561
 
577
- {{< example class="flex justify-center pt-24 h-80" github="components/speed-dial.md" show_dark=true >}}
562
+ ```html
578
563
  <div data-dial-init class="fixed end-6 bottom-6 group">
579
564
  <div id="speed-dial-menu-vertical" class="flex flex-col items-center hidden mt-4 space-y-2">
580
565
  <button type="button" data-tooltip-target="tooltip-share" data-tooltip-placement="left" class="flex justify-center items-center w-[52px] h-[52px] text-body hover:text-heading bg-neutral-primary-soft rounded-full border border-default shadow-xs hover:bg-neutral-secondary-medium hover:border-default-medium focus:ring-4 focus:ring-neutral-secondary-soft focus:outline-none">
@@ -615,13 +600,13 @@ The default alignment of the menu items of the speed dial is vertical using the
615
600
  <span class="sr-only">Open actions menu</span>
616
601
  </button>
617
602
  </div>
618
- {{< /example >}}
603
+ ```
619
604
 
620
605
  ### Horizontal
621
606
 
622
607
  Horizontally align the speed dial menu items by using the flexbox utility classes from Tailwind CSS.
623
608
 
624
- {{< example class="flex justify-center pt-24 h-80" github="components/speed-dial.md" show_dark=true >}}
609
+ ```html
625
610
 
626
611
  <div data-dial-init class="fixed flex end-6 bottom-6 group">
627
612
  <div id="speed-dial-menu-horizontal" class="flex items-center hidden me-4 space-x-2 rtl:space-x-reverse">
@@ -663,7 +648,7 @@ Horizontally align the speed dial menu items by using the flexbox utility classe
663
648
  <span class="sr-only">Open actions menu</span>
664
649
  </button>
665
650
  </div>
666
- {{< /example >}}
651
+ ```
667
652
 
668
653
  ## Triggering
669
654
 
@@ -673,7 +658,7 @@ Use the `data-dial-trigger="{click|hover}"` data attributes on the trigger eleme
673
658
 
674
659
  The default trigger type is hover for each speed dial component.
675
660
 
676
- {{< example class="flex justify-center pt-24 h-80" github="components/speed-dial.md" show_dark=true >}}
661
+ ```html
677
662
  <div data-dial-init class="fixed end-6 bottom-6 group">
678
663
  <div id="speed-dial-menu-hover" class="flex flex-col items-center hidden mt-4 space-y-2">
679
664
  <button type="button" data-tooltip-target="tooltip-share" data-tooltip-placement="left" class="flex justify-center items-center w-[52px] h-[52px] text-body hover:text-heading bg-neutral-primary-soft rounded-full border border-default shadow-xs hover:bg-neutral-secondary-medium hover:border-default-medium focus:ring-4 focus:ring-neutral-secondary-soft focus:outline-none">
@@ -714,13 +699,13 @@ The default trigger type is hover for each speed dial component.
714
699
  <span class="sr-only">Open actions menu</span>
715
700
  </button>
716
701
  </div>
717
- {{< /example >}}
702
+ ```
718
703
 
719
704
  ### Click
720
705
 
721
706
  If you want the speed dial component to activate when clicking instead of hovering over the trigger element then you need to set the `click` value inside of the `data-dial-toggle="click"` data attribute on the trigger element.
722
707
 
723
- {{< example class="flex justify-center pt-24 h-80" github="components/speed-dial.md" show_dark=true >}}
708
+ ```html
724
709
 
725
710
  <div data-dial-init class="fixed end-6 bottom-6 group">
726
711
  <div id="speed-dial-menu-click" class="flex flex-col items-center hidden mb-4 space-y-2">
@@ -762,7 +747,7 @@ If you want the speed dial component to activate when clicking instead of hoveri
762
747
  <span class="sr-only">Open actions menu</span>
763
748
  </button>
764
749
  </div>
765
- {{< /example >}}
750
+ ```
766
751
 
767
752
  ## JavaScript behaviour
768
753
 
@@ -1010,7 +995,7 @@ Three arguments are required for the Speed Dial component, namely the parent ele
1010
995
 
1011
996
  Furthermore, you can also pass an object of options to set the trigger type and set the callback functions.
1012
997
 
1013
- {{< code lang="javascript" file="speed-dial.js" icon="file" >}}
998
+ ```javascript
1014
999
  // parent element wrapping the speed dial
1015
1000
  const $parentEl = document.getElementById('dialParent');
1016
1001
 
@@ -1039,11 +1024,11 @@ const instanceOptions = {
1039
1024
  id: 'dialContent',
1040
1025
  override: true
1041
1026
  };
1042
- {{< /code >}}
1027
+ ```
1043
1028
 
1044
1029
  Create a new Speed Dial object based on the options above.
1045
1030
 
1046
- {{< code lang="javascript" file="speed-dial.js" icon="file" >}}
1031
+ ```javascript
1047
1032
  import { Dial } from 'flowbite';
1048
1033
 
1049
1034
  /*
@@ -1054,11 +1039,11 @@ import { Dial } from 'flowbite';
1054
1039
  * instanceOptions: optional
1055
1040
  */
1056
1041
  const dial = new Dial($parentEl, $triggerEl, $targetEl, options, instanceOptions);
1057
- {{< /code >}}
1042
+ ```
1058
1043
 
1059
1044
  Use the `show`, `hide`, or `toggle` methods on the Speed Dial object to programmatically show and hide the speed dial component using JavaScript.
1060
1045
 
1061
- {{< code lang="javascript" file="speed-dial.js" icon="file" >}}
1046
+ ```javascript
1062
1047
  // show the speed dial
1063
1048
  dial.show();
1064
1049
 
@@ -1067,13 +1052,13 @@ dial.hide();
1067
1052
 
1068
1053
  // toggle the visibility of the speed dial
1069
1054
  dial.toggle();
1070
- {{< /code >}}
1055
+ ```
1071
1056
 
1072
1057
  ### HTML Markup
1073
1058
 
1074
1059
  Use the following HTML code for the JavaScript example above.
1075
1060
 
1076
- {{< code lang="html" file="speed-dial.html" icon="file" >}}
1061
+ ```html
1077
1062
  <div id="dialParent" class="group fixed bottom-6 end-6">
1078
1063
  <div
1079
1064
  id="dialContent"
@@ -1215,15 +1200,15 @@ Use the following HTML code for the JavaScript example above.
1215
1200
  <span class="sr-only">Open actions menu</span>
1216
1201
  </button>
1217
1202
  </div>
1218
- {{< /code >}}
1203
+ ```
1219
1204
 
1220
1205
  ### TypeScript
1221
1206
 
1222
- If you're using the <a href="{{< ref "getting-started/typescript" >}}">TypeScript configuration</a> from Flowbite then you can import the types for the Speed Dial class, parameters and its options.
1207
+ If you're using the TypeScript configuration from Flowbite then you can import the types for the Speed Dial class, parameters and its options.
1223
1208
 
1224
1209
  Here's an example that applies the types from Flowbite to the code above:
1225
1210
 
1226
- {{< code lang="typescript" file="speed-dial.ts" icon="file" >}}
1211
+ ```typescript
1227
1212
  import { Dial } from 'flowbite';
1228
1213
  import type { DialOptions, DialInterface } from 'flowbite';
1229
1214
  import type { InstanceOptions } from 'flowbite';
@@ -1267,4 +1252,4 @@ const dial: DialInterface = new Dial($parentEl, $triggerEl, $targetEl, options);
1267
1252
 
1268
1253
  // show the speed dial
1269
1254
  dial.show();
1270
- {{< /code >}}
1255
+ ```
@@ -1,23 +1,10 @@
1
- ---
2
- layout: docs
3
- title: Tailwind CSS Spinner - Flowbite
4
- description: Use the spinner component as a loader indicator in your projects when fetching data based on an animated SVG using the utility classes from Tailwind CSS
5
- group: components
6
- toc: true
7
-
8
- previous: Speed Dial
9
- previousLink: components/speed-dial/
10
- next: Stepper
11
- nextLink: components/stepper/
12
- ---
13
-
14
1
  The spinner component can be used as a loading indicator which comes in multiple colors, sizes, and styles separately or inside elements such as buttons to improve the user experience whenever data is being fetched from your server.
15
2
 
16
3
  ## Default spinner
17
4
 
18
5
  Use the following SVG element with the `animate-spin` animation class to show a loading animation:
19
6
 
20
- {{< example github="components/spinner.md" show_dark=true >}}
7
+ ```html
21
8
  <div role="status">
22
9
  <svg aria-hidden="true" class="w-8 h-8 text-neutral-tertiary animate-spin fill-brand" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
23
10
  <path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
@@ -25,7 +12,7 @@ Use the following SVG element with the `animate-spin` animation class to show a
25
12
  </svg>
26
13
  <span class="sr-only">Loading...</span>
27
14
  </div>
28
- {{< /example >}}
15
+ ```
29
16
 
30
17
  ## Colors
31
18
 
@@ -34,7 +21,7 @@ You can change the colors of the spinner element using the fill and color utilit
34
21
  - use `fill-{*}` to change the main colors
35
22
  - use `text-{*}` to change the background
36
23
 
37
- {{< example github="components/spinner.md" class="flex items-center space-x-2 rtl:space-x-reverse" show_dark=true >}}
24
+ ```html
38
25
  <div role="status">
39
26
  <svg aria-hidden="true" class="inline w-8 h-8 w-8 h-8 text-neutral-tertiary animate-spin fill-brand" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
40
27
  <path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
@@ -84,13 +71,13 @@ You can change the colors of the spinner element using the fill and color utilit
84
71
  </svg>
85
72
  <span class="sr-only">Loading...</span>
86
73
  </div>
87
- {{< /example >}}
74
+ ```
88
75
 
89
76
  ## Sizes
90
77
 
91
78
  Change the size of the spinner component using the `h-{*}` and `w-{*}` utility classes from Tailwind CSS:
92
79
 
93
- {{< example github="components/spinner.md" class="flex items-center space-x-2 rtl:space-x-reverse" show_dark=true >}}
80
+ ```html
94
81
 
95
82
  <div role="status">
96
83
  <svg aria-hidden="true" class="inline w-4 h-4 w-8 h-8 text-neutral-tertiary animate-spin fill-brand" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -120,13 +107,13 @@ Change the size of the spinner component using the `h-{*}` and `w-{*}` utility c
120
107
  </svg>
121
108
  <span class="sr-only">Loading...</span>
122
109
  </div>
123
- {{< /example >}}
110
+ ```
124
111
 
125
112
  ## Alignment
126
113
 
127
114
  Because the spinner component is an inline HTML element it can easily be aligned on the left, center, or right side using the `text-{left|center|right}` utility classes:
128
115
 
129
- {{< example github="components/spinner.md" show_dark=true >}}
116
+ ```html
130
117
 
131
118
  <div class="text-left rtl:text-right">
132
119
  <div role="status">
@@ -155,13 +142,13 @@ Because the spinner component is an inline HTML element it can easily be aligned
155
142
  <span class="sr-only">Loading...</span>
156
143
  </div>
157
144
  </div>
158
- {{< /example >}}
145
+ ```
159
146
 
160
147
  ## Spinner with card
161
148
 
162
149
  Use this animated loading indicator when content inside of a card is still loading.
163
150
 
164
- {{< example github="components/spinner.md" show_dark=true >}}
151
+ ```html
165
152
 
166
153
  <div class="relative items-center block max-w-sm p-6 bg-neutral-primary-soft border border-default rounded-base shadow-xs">
167
154
  <h5 class="mb-2 text-xl font-semibold tracking-tight text-heading opacity-20">Noteworthy technology acquisitions 2021</h5>
@@ -171,13 +158,13 @@ Use this animated loading indicator when content inside of a card is still loadi
171
158
  <span class="sr-only">Loading...</span>
172
159
  </div>
173
160
  </div>
174
- {{< /example >}}
161
+ ```
175
162
 
176
163
  ## Progress spinner
177
164
 
178
165
  Use this animated spinner component inside a list of steppers elements.
179
166
 
180
- {{< example github="components/spinner.md" show_dark=true >}}
167
+ ```html
181
168
 
182
169
  <h2 class="mb-4 text-lg font-medium text-heading">Converting your image:</h2>
183
170
  <ul class="max-w-md space-y-3 text-body list-inside">
@@ -197,13 +184,13 @@ Use this animated spinner component inside a list of steppers elements.
197
184
  Preparing your file
198
185
  </li>
199
186
  </ul>
200
- {{< /example >}}
187
+ ```
201
188
 
202
189
  ## Buttons
203
190
 
204
191
  The spinner component can also be used inside elements such as buttons when submitting form data:
205
192
 
206
- {{< example github="components/spinner.md" show_dark=true >}}
193
+ ```html
207
194
 
208
195
  <button type="button" class="inline-flex items-center text-body bg-neutral-primary-soft border border-default hover:bg-neutral-secondary-medium hover:text-heading focus:ring-4 focus:ring-neutral-tertiary-soft shadow-xs font-medium leading-5 rounded-base text-sm px-4 py-2.5 focus:outline-none">
209
196
  <svg aria-hidden="true" class="w-4 h-4 text-neutral-tertiary animate-spin fill-brand me-2" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -213,7 +200,7 @@ The spinner component can also be used inside elements such as buttons when subm
213
200
  Loading...
214
201
  </button>
215
202
 
216
- {{< /example >}}
203
+ ```
217
204
 
218
205
  ## Accessibillity
219
206