flowbite-mcp 1.0.0

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 (77) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +324 -0
  3. package/build/index.js +975 -0
  4. package/build/server-runner.js +228 -0
  5. package/data/components/accordion.md +860 -0
  6. package/data/components/alerts.md +739 -0
  7. package/data/components/avatar.md +178 -0
  8. package/data/components/badge.md +420 -0
  9. package/data/components/banner.md +145 -0
  10. package/data/components/bottom-navigation.md +513 -0
  11. package/data/components/breadcrumb.md +273 -0
  12. package/data/components/button-group.md +410 -0
  13. package/data/components/buttons.md +405 -0
  14. package/data/components/card.md +711 -0
  15. package/data/components/carousel.md +858 -0
  16. package/data/components/chat-bubble.md +1063 -0
  17. package/data/components/clipboard.md +1029 -0
  18. package/data/components/datepicker.md +673 -0
  19. package/data/components/device-mockups.md +152 -0
  20. package/data/components/drawer.md +1353 -0
  21. package/data/components/dropdowns.md +1925 -0
  22. package/data/components/footer.md +299 -0
  23. package/data/components/forms.md +371 -0
  24. package/data/components/gallery.md +322 -0
  25. package/data/components/indicators.md +262 -0
  26. package/data/components/jumbotron.md +213 -0
  27. package/data/components/kbd.md +217 -0
  28. package/data/components/list-group.md +365 -0
  29. package/data/components/mega-menu.md +558 -0
  30. package/data/components/modal.md +1309 -0
  31. package/data/components/navbar.md +1053 -0
  32. package/data/components/pagination.md +472 -0
  33. package/data/components/popover.md +826 -0
  34. package/data/components/progress.md +95 -0
  35. package/data/components/qr-code.md +280 -0
  36. package/data/components/rating.md +323 -0
  37. package/data/components/sidebar.md +1067 -0
  38. package/data/components/skeleton.md +221 -0
  39. package/data/components/speed-dial.md +1270 -0
  40. package/data/components/spinner.md +222 -0
  41. package/data/components/stepper.md +271 -0
  42. package/data/components/tables.md +3127 -0
  43. package/data/components/tabs.md +808 -0
  44. package/data/components/timeline.md +304 -0
  45. package/data/components/toast.md +341 -0
  46. package/data/components/tooltips.md +524 -0
  47. package/data/components/typography.md +269 -0
  48. package/data/components/video.md +95 -0
  49. package/data/forms/checkbox.md +375 -0
  50. package/data/forms/file-input.md +98 -0
  51. package/data/forms/floating-label.md +185 -0
  52. package/data/forms/input-field.md +222 -0
  53. package/data/forms/number-input.md +1099 -0
  54. package/data/forms/phone-input.md +577 -0
  55. package/data/forms/radio.md +315 -0
  56. package/data/forms/range.md +83 -0
  57. package/data/forms/search-input.md +280 -0
  58. package/data/forms/select.md +259 -0
  59. package/data/forms/textarea.md +155 -0
  60. package/data/forms/timepicker.md +732 -0
  61. package/data/forms/toggle.md +176 -0
  62. package/data/plugins/charts.md +2683 -0
  63. package/data/plugins/datatables.md +1922 -0
  64. package/data/plugins/datepicker.md +5 -0
  65. package/data/plugins/wysiwyg.md +2377 -0
  66. package/data/quickstart.md +169 -0
  67. package/data/theme.md +231 -0
  68. package/data/toc.md +79 -0
  69. package/data/typography/blockquote.md +182 -0
  70. package/data/typography/headings.md +174 -0
  71. package/data/typography/hr.md +74 -0
  72. package/data/typography/images.md +168 -0
  73. package/data/typography/links.md +118 -0
  74. package/data/typography/lists.md +387 -0
  75. package/data/typography/paragraphs.md +186 -0
  76. package/data/typography/text.md +249 -0
  77. package/package.json +71 -0
@@ -0,0 +1,315 @@
1
+ ---
2
+ layout: docs
3
+ title: Tailwind CSS Radio - Flowbite
4
+ description: Get started with the radio component to let the user choose a single option from multiple options in the form of a circle based on multiple styles and colors
5
+ group: forms
6
+ toc: true
7
+ requires_js: true
8
+
9
+ previous: Checkbox
10
+ previousLink: forms/checkbox/
11
+ next: Toggle
12
+ nextLink: forms/toggle/
13
+ ---
14
+
15
+ The radio component can be used to allow the user to choose a single option from one or more available options coded with the utility classes from Tailwind CSS and available in multiple styles, variants, and colors and support dark mode.
16
+
17
+ Make sure that you have included Flowbite as a plugin inside your Tailwind CSS project to apply all the necessary styles for the radio component.
18
+
19
+ ## Radio example
20
+
21
+ Use the default example of a radio component with the checked and unchecked state.
22
+
23
+ {{< example github="forms/radio.md" show_dark=true >}}
24
+ <div class="flex items-center mb-4">
25
+ <input id="default-radio-1" type="radio" value="" name="default-radio" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
26
+ <label for="default-radio-1" class="select-none ms-2 text-sm font-medium text-heading">Default radio</label>
27
+ </div>
28
+ <div class="flex items-center">
29
+ <input checked id="default-radio-2" type="radio" value="" name="default-radio" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
30
+ <label for="default-radio-2" class="select-none ms-2 text-sm font-medium text-heading">Checked state</label>
31
+ </div>
32
+ {{< /example >}}
33
+
34
+ ## Disabled state
35
+
36
+ Apply the `disabled` attribute to the radio component to disallow the selection for the user.
37
+
38
+ {{< example github="forms/radio.md" show_dark=true >}}
39
+ <div class="flex items-center mb-4">
40
+ <input disabled id="disabled-radio-1" type="radio" value="" name="disabled-radio" class="w-4 h-4 text-neutral-primary border-light-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
41
+ <label for="disabled-radio-1" class="select-none ms-2 text-sm font-medium text-fg-disabled">Disabled radio</label>
42
+ </div>
43
+ <div class="flex items-center">
44
+ <input disabled checked id="disabled-radio-2" type="radio" value="" name="disabled-radio" class="w-4 h-4 text-neutral-primary border-light bg-neutral-secondary-medium rounded-full checked:border-default-medium focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
45
+ <label for="disabled-radio-2" class="select-none ms-2 text-sm font-medium text-fg-disabled">Disabled checked</label>
46
+ </div>
47
+ {{< /example >}}
48
+
49
+ ## Radio link
50
+
51
+ Use this example if you want to include an anchor tag inside the label of the radio component.
52
+
53
+ {{< example github="forms/radio.md" show_dark=true >}}
54
+ <div class="flex items-center">
55
+ <input id="link-radio" type="radio" value="" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
56
+ <label for="link-radio" class="select-none ms-2 text-sm font-medium text-heading">Radio button with a <a href="#" class="text-fg-brand hover:underline font-medium">link inside</a>.</label>
57
+ </div>
58
+ {{< /example >}}
59
+
60
+ ## Helper text
61
+
62
+ Get started with this example if you want to add a secondary text to the label for the radio component.
63
+
64
+ {{< example github="forms/radio.md" show_dark=true >}}
65
+ <div class="flex">
66
+ <div class="flex items-center h-5">
67
+ <input id="helper-radio" aria-describedby="helper-radio-text" type="radio" value="" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
68
+ </div>
69
+ <div class="ms-2 text-sm select-none">
70
+ <label for="helper-radio" class="font-medium text-heading mb-1">Free shipping via Flowbite</label>
71
+ <p id="helper-radio-text" class="text-xs font-normal text-body">For orders shipped from $25 in books or $29 in other categories</p>
72
+ </div>
73
+ </div>
74
+ {{< /example >}}
75
+
76
+ ## Bordered
77
+
78
+ Use this example to show a radio input elements inside a card with border.
79
+
80
+ {{< example class="grid gap-6 md:grid-cols-2" github="forms/radio.md" show_dark=true >}}
81
+ <div class="flex items-center ps-4 border border-default bg-neutral-primary-soft rounded-base">
82
+ <input id="bordered-radio-1" type="radio" value="" name="bordered-radio" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
83
+ <label for="bordered-radio-1" class="w-full py-4 select-none ms-2 text-sm font-medium text-heading">Default radio</label>
84
+ </div>
85
+ <div class="flex items-center ps-4 border border-default bg-neutral-primary-soft rounded-base">
86
+ <input checked id="bordered-radio-2" type="radio" value="" name="bordered-radio" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
87
+ <label for="bordered-radio-2" class="w-full py-4 select-none ms-2 text-sm font-medium text-heading">Checked state</label>
88
+ </div>
89
+ {{< /example >}}
90
+
91
+ ## Radio list group
92
+
93
+ This example can be used to show a list of radio buttons inside a grouped list.
94
+
95
+ {{< example github="components/radio.md" show_dark=true >}}
96
+ <h3 class="mb-4 font-semibold text-heading">Identification</h3>
97
+ <ul class="w-48 bg-neutral-primary-soft border border-default rounded-base">
98
+ <li class="w-full border-b border-default">
99
+ <div class="flex items-center ps-3">
100
+ <input id="list-radio-license" type="radio" value="" name="list-radio" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
101
+ <label for="list-radio-license" class="w-full py-3 select-none ms-2 text-sm font-medium text-heading">Driver License </label>
102
+ </div>
103
+ </li>
104
+ <li class="w-full border-b border-default">
105
+ <div class="flex items-center ps-3">
106
+ <input id="list-radio-id" type="radio" value="" name="list-radio" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
107
+ <label for="list-radio-id" class="w-full py-3 select-none ms-2 text-sm font-medium text-heading">State ID</label>
108
+ </div>
109
+ </li>
110
+ <li class="w-full border-b border-default">
111
+ <div class="flex items-center ps-3">
112
+ <input id="list-radio-military" type="radio" value="" name="list-radio" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
113
+ <label for="list-radio-military" class="w-full py-3 select-none ms-2 text-sm font-medium text-heading">US Military</label>
114
+ </div>
115
+ </li>
116
+ <li class="w-full border-b border-default">
117
+ <div class="flex items-center ps-3">
118
+ <input id="list-radio-passport" type="radio" value="" name="list-radio" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
119
+ <label for="list-radio-passport" class="w-full py-3 select-none ms-2 text-sm font-medium text-heading">US Passport</label>
120
+ </div>
121
+ </li>
122
+ </ul>
123
+ {{< /example >}}
124
+
125
+ ## Horizontal list group
126
+
127
+ Use this example to group up radio button components inside a list.
128
+
129
+ {{< example github="components/radio.md" show_dark=true >}}
130
+ <h3 class="mb-4 font-semibold text-heading">Identification</h3>
131
+ <ul class="items-center w-full text-sm font-medium text-heading bg-neutral-primary-soft border border-default rounded-lg sm:flex">
132
+ <li class="w-full border-b border-default sm:border-b-0 sm:border-r">
133
+ <div class="flex items-center ps-3">
134
+ <input id="horizontal-list-radio-license" type="radio" value="" name="list-radio" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
135
+ <label for="horizontal-list-radio-license" class="w-full py-3 select-none ms-2 text-sm font-medium text-heading">Driver License </label>
136
+ </div>
137
+ </li>
138
+ <li class="w-full border-b border-default sm:border-b-0 sm:border-r">
139
+ <div class="flex items-center ps-3">
140
+ <input id="horizontal-list-radio-id" type="radio" value="" name="list-radio" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
141
+ <label for="horizontal-list-radio-id" class="w-full py-3 select-none ms-2 text-sm font-medium text-heading">State ID</label>
142
+ </div>
143
+ </li>
144
+ <li class="w-full border-b border-default sm:border-b-0 sm:border-r">
145
+ <div class="flex items-center ps-3">
146
+ <input id="horizontal-list-radio-military" type="radio" value="" name="list-radio" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
147
+ <label for="horizontal-list-radio-military" class="w-full py-3 select-none ms-2 text-sm font-medium text-heading">US Military</label>
148
+ </div>
149
+ </li>
150
+ <li class="w-full">
151
+ <div class="flex items-center ps-3">
152
+ <input id="horizontal-list-radio-passport" type="radio" value="" name="list-radio" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
153
+ <label for="horizontal-list-radio-passport" class="w-full py-3 select-none ms-2 text-sm font-medium text-heading">US Passport</label>
154
+ </div>
155
+ </li>
156
+ </ul>
157
+ {{< /example >}}
158
+
159
+ <div class="mt-8 -mb-5">
160
+ {{< requires_js >}}
161
+ </div>
162
+
163
+ ## Radio in dropdown
164
+
165
+ Here's an example of a list group that you can use right away.
166
+
167
+ {{< example class="flex justify-center" github="components/radio.md" show_dark=true iframeHeight="370" >}}
168
+ <button id="dropdownHelperRadioButton" data-dropdown-toggle="dropdownHelperRadio" class="inline-flex items-center justify-center text-white bg-brand box-border border border-transparent hover:bg-brand-strong focus:ring-4 focus:ring-brand-medium shadow-xs font-medium leading-5 rounded-base text-sm px-4 py-2.5 focus:outline-none" type="button">
169
+ Dropdown button
170
+ <svg class="w-4 h-4 ms-1.5 -me-0.5" 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="m19 9-7 7-7-7"/></svg>
171
+ </button>
172
+
173
+ <!-- Dropdown menu -->
174
+ <div id="dropdownHelperRadio" class="z-10 hidden bg-neutral-primary-medium border border-default-medium rounded-base shadow-lg w-56" data-popper-reference-hidden="" data-popper-escaped="" data-popper-placement="top">
175
+ <ul class="p-2 text-sm text-body font-medium" aria-labelledby="dropdownHelperRadioButton">
176
+ <li>
177
+ <div class="flex p-2 w-full hover:bg-neutral-tertiary-medium hover:text-heading rounded">
178
+ <div class="flex items-center h-5">
179
+ <input id="helper-radio-4" name="helper-radio" type="radio" value="" class="w-4 h-4 text-neutral-primary border-default-strong bg-neutral-secondary-strong rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
180
+ </div>
181
+ <div class="ms-2 text-sm">
182
+ <label for="helper-radio-4" class="select-none font-medium text-heading">
183
+ <div class="mb-1">Individual</div>
184
+ <p id="helper-radio-text-4" class="text-xs font-normal text-body">Some helpful instruction goes over here.</p>
185
+ </label>
186
+ </div>
187
+ </div>
188
+ </li>
189
+ <li>
190
+ <div class="flex p-2 w-full hover:bg-neutral-tertiary-medium hover:text-heading rounded">
191
+ <div class="flex items-center h-5">
192
+ <input id="helper-radio-5" name="helper-radio" type="radio" value="" class="w-4 h-4 text-neutral-primary border-default-strong bg-neutral-secondary-strong rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
193
+ </div>
194
+ <div class="ms-2 text-sm">
195
+ <label for="helper-radio-5" class="select-none font-medium text-heading">
196
+ <div class="mb-1">Company</div>
197
+ <p id="helper-radio-text-5" class="text-xs font-normal text-body">Some helpful instruction goes over here.</p>
198
+ </label>
199
+ </div>
200
+ </div>
201
+ </li>
202
+ <li>
203
+ <div class="flex p-2 w-full hover:bg-neutral-tertiary-medium hover:text-heading rounded">
204
+ <div class="flex items-center h-5">
205
+ <input id="helper-radio-6" name="helper-radio" type="radio" value="" class="w-4 h-4 text-neutral-primary border-default-strong bg-neutral-secondary-strong rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
206
+ </div>
207
+ <div class="ms-2 text-sm">
208
+ <label for="helper-radio-6" class="select-none font-medium text-heading">
209
+ <div class="mb-1">Non profit</div>
210
+ <p id="helper-radio-text-6" class="text-xs font-normal text-body">Some helpful instruction goes over here.</p>
211
+ </label>
212
+ </div>
213
+ </div>
214
+ </li>
215
+ </ul>
216
+ </div>
217
+ {{< /example >}}
218
+
219
+ ## Inline layout
220
+
221
+ Use the `flex` class for a wrapper element to horizontally align the radio elements.
222
+
223
+ {{< example github="forms/radio.md" show_dark=true >}}
224
+ <div class="flex">
225
+ <div class="flex items-center me-4">
226
+ <input id="inline-radio" type="radio" value="" name="inline-radio-group" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
227
+ <label for="inline-radio" class="select-none ms-2 text-sm font-medium text-heading">Inline 1</label>
228
+ </div>
229
+ <div class="flex items-center me-4">
230
+ <input id="inline-2-radio" type="radio" value="" name="inline-radio-group" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
231
+ <label for="inline-2-radio" class="select-none ms-2 text-sm font-medium text-heading">Inline 2</label>
232
+ </div>
233
+ <div class="flex items-center me-4">
234
+ <input checked id="inline-checked-radio" type="radio" value="" name="inline-radio-group" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
235
+ <label for="inline-checked-radio" class="select-none ms-2 text-sm font-medium text-heading">Inline checked</label>
236
+ </div>
237
+ <div class="flex items-center">
238
+ <input disabled id="inline-disabled-radio" type="radio" value="" name="inline-radio-group" class="w-4 h-4 text-neutral-primary border-default-medium bg-neutral-secondary-medium rounded-full checked:border-brand focus:ring-2 focus:outline-none focus:ring-brand-subtle border border-default appearance-none">
239
+ <label for="inline-disabled-radio" class="select-none ms-2 text-sm font-medium text-fg-disabled">Inline disabled</label>
240
+ </div>
241
+ </div>
242
+ {{< /example >}}
243
+
244
+ ## Advanced layout
245
+
246
+ Use this example of a more advanced radio component to add more information and update the style of the whole card instead of just the circled dot.
247
+
248
+ {{< example class="flex flex-wrap" github="forms/checkbox.md" show_dark=true >}}
249
+ <h3 class="mb-5 text-lg font-medium text-gray-900 dark:text-white">How much do you expect to use each month?</h3>
250
+ <ul class="grid w-full gap-6 md:grid-cols-2">
251
+ <li>
252
+ <input type="radio" id="hosting-small" name="hosting" value="hosting-small" class="hidden peer" required />
253
+ <label for="hosting-small" class="inline-flex items-center justify-between w-full p-5 text-body bg-neutral-primary-soft border-1 border-default rounded-base cursor-pointer peer-checked:hover:bg-brand-softer peer-checked:border-brand-subtle peer-checked:bg-brand-softer hover:bg-neutral-secondary-medium peer-checked:text-fg-brand-strong">
254
+ <div class="block">
255
+ <div class="w-full font-semibold">0-50 MB</div>
256
+ <div class="w-full">Good for small websites</div>
257
+ </div>
258
+ <svg class="w-5 h-5 ms-3 rtl:rotate-180" 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="M19 12H5m14 0-4 4m4-4-4-4"/></svg>
259
+ </label>
260
+ </li>
261
+ <li>
262
+ <input type="radio" id="hosting-big" name="hosting" value="hosting-big" class="hidden peer">
263
+ <label for="hosting-big" class="inline-flex items-center justify-between w-full w-full p-5 text-body bg-neutral-primary-soft border-1 border-default rounded-base cursor-pointer peer-checked:hover:bg-brand-softer peer-checked:border-brand-subtle peer-checked:bg-brand-softer hover:bg-neutral-secondary-medium peer-checked:text-fg-brand-strong">
264
+ <div class="block">
265
+ <div class="w-full font-semibold">500-1000 MB</div>
266
+ <div class="w-full">Good for large websites</div>
267
+ </div>
268
+ <svg class="w-5 h-5 ms-3 rtl:rotate-180" 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="M19 12H5m14 0-4 4m4-4-4-4"/></svg>
269
+ </label>
270
+ </li>
271
+ </ul>
272
+
273
+ {{< /example >}}
274
+
275
+ ## Advanced layout with icons
276
+
277
+ Use this example to show an advanced layout of radio button elements with icons.
278
+
279
+ {{< example class="flex flex-wrap" github="forms/checkbox.md" show_dark=true >}}
280
+ <h3 class="mb-4 text-lg font-medium text-heading">Choose technology:</h3>
281
+ <ul class="select-none grid w-full gap-4 md:grid-cols-3">
282
+ <li>
283
+ <input type="radio" id="react-option" value="react-option" name="technologies" class="hidden peer" required="" checked>
284
+ <label for="react-option" class="inline-flex items-center justify-between w-full p-5 text-body bg-neutral-primary-soft border-1 border-default rounded-base cursor-pointer peer-checked:hover:bg-brand-softer peer-checked:border-brand-subtle peer-checked:bg-brand-softer hover:bg-neutral-secondary-medium peer-checked:text-fg-brand-strong">
285
+ <div class="block">
286
+ <svg class="mb-2 w-7 h-7 text-sky-600" fill="currentColor" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M418.2 177.2c-5.4-1.8-10.8-3.5-16.2-5.1.9-3.7 1.7-7.4 2.5-11.1 12.3-59.6 4.2-107.5-23.1-123.3-26.3-15.1-69.2.6-112.6 38.4-4.3 3.7-8.5 7.6-12.5 11.5-2.7-2.6-5.5-5.2-8.3-7.7-45.5-40.4-91.1-57.4-118.4-41.5-26.2 15.2-34 60.3-23 116.7 1.1 5.6 2.3 11.1 3.7 16.7-6.4 1.8-12.7 3.8-18.6 5.9C38.3 196.2 0 225.4 0 255.6c0 31.2 40.8 62.5 96.3 81.5 4.5 1.5 9 3 13.6 4.3-1.5 6-2.8 11.9-4 18-10.5 55.5-2.3 99.5 23.9 114.6 27 15.6 72.4-.4 116.6-39.1 3.5-3.1 7-6.3 10.5-9.7 4.4 4.3 9 8.4 13.6 12.4 42.8 36.8 85.1 51.7 111.2 36.6 27-15.6 35.8-62.9 24.4-120.5-.9-4.4-1.9-8.9-3-13.5 3.2-.9 6.3-1.9 9.4-2.9 57.7-19.1 99.5-50 99.5-81.7 0-30.3-39.4-59.7-93.8-78.4zM282.9 92.3c37.2-32.4 71.9-45.1 87.7-36 16.9 9.7 23.4 48.9 12.8 100.4-.7 3.4-1.4 6.7-2.3 10-22.2-5-44.7-8.6-67.3-10.6-13-18.6-27.2-36.4-42.6-53.1 3.9-3.7 7.7-7.2 11.7-10.7zM167.2 307.5c5.1 8.7 10.3 17.4 15.8 25.9-15.6-1.7-31.1-4.2-46.4-7.5 4.4-14.4 9.9-29.3 16.3-44.5 4.6 8.8 9.3 17.5 14.3 26.1zm-30.3-120.3c14.4-3.2 29.7-5.8 45.6-7.8-5.3 8.3-10.5 16.8-15.4 25.4-4.9 8.5-9.7 17.2-14.2 26-6.3-14.9-11.6-29.5-16-43.6zm27.4 68.9c6.6-13.8 13.8-27.3 21.4-40.6s15.8-26.2 24.4-38.9c15-1.1 30.3-1.7 45.9-1.7s31 .6 45.9 1.7c8.5 12.6 16.6 25.5 24.3 38.7s14.9 26.7 21.7 40.4c-6.7 13.8-13.9 27.4-21.6 40.8-7.6 13.3-15.7 26.2-24.2 39-14.9 1.1-30.4 1.6-46.1 1.6s-30.9-.5-45.6-1.4c-8.7-12.7-16.9-25.7-24.6-39s-14.8-26.8-21.5-40.6zm180.6 51.2c5.1-8.8 9.9-17.7 14.6-26.7 6.4 14.5 12 29.2 16.9 44.3-15.5 3.5-31.2 6.2-47 8 5.4-8.4 10.5-17 15.5-25.6zm14.4-76.5c-4.7-8.8-9.5-17.6-14.5-26.2-4.9-8.5-10-16.9-15.3-25.2 16.1 2 31.5 4.7 45.9 8-4.6 14.8-10 29.2-16.1 43.4zM256.2 118.3c10.5 11.4 20.4 23.4 29.6 35.8-19.8-.9-39.7-.9-59.5 0 9.8-12.9 19.9-24.9 29.9-35.8zM140.2 57c16.8-9.8 54.1 4.2 93.4 39 2.5 2.2 5 4.6 7.6 7-15.5 16.7-29.8 34.5-42.9 53.1-22.6 2-45 5.5-67.2 10.4-1.3-5.1-2.4-10.3-3.5-15.5-9.4-48.4-3.2-84.9 12.6-94zm-24.5 263.6c-4.2-1.2-8.3-2.5-12.4-3.9-21.3-6.7-45.5-17.3-63-31.2-10.1-7-16.9-17.8-18.8-29.9 0-18.3 31.6-41.7 77.2-57.6 5.7-2 11.5-3.8 17.3-5.5 6.8 21.7 15 43 24.5 63.6-9.6 20.9-17.9 42.5-24.8 64.5zm116.6 98c-16.5 15.1-35.6 27.1-56.4 35.3-11.1 5.3-23.9 5.8-35.3 1.3-15.9-9.2-22.5-44.5-13.5-92 1.1-5.6 2.3-11.2 3.7-16.7 22.4 4.8 45 8.1 67.9 9.8 13.2 18.7 27.7 36.6 43.2 53.4-3.2 3.1-6.4 6.1-9.6 8.9zm24.5-24.3c-10.2-11-20.4-23.2-30.3-36.3 9.6.4 19.5.6 29.5.6 10.3 0 20.4-.2 30.4-.7-9.2 12.7-19.1 24.8-29.6 36.4zm130.7 30c-.9 12.2-6.9 23.6-16.5 31.3-15.9 9.2-49.8-2.8-86.4-34.2-4.2-3.6-8.4-7.5-12.7-11.5 15.3-16.9 29.4-34.8 42.2-53.6 22.9-1.9 45.7-5.4 68.2-10.5 1 4.1 1.9 8.2 2.7 12.2 4.9 21.6 5.7 44.1 2.5 66.3zm18.2-107.5c-2.8.9-5.6 1.8-8.5 2.6-7-21.8-15.6-43.1-25.5-63.8 9.6-20.4 17.7-41.4 24.5-62.9 5.2 1.5 10.2 3.1 15 4.7 46.6 16 79.3 39.8 79.3 58 0 19.6-34.9 44.9-84.8 61.4zm-149.7-15c25.3 0 45.8-20.5 45.8-45.8s-20.5-45.8-45.8-45.8c-25.3 0-45.8 20.5-45.8 45.8s20.5 45.8 45.8 45.8z"/></svg>
287
+ <div class="w-full font-medium mb-1">React Js</div>
288
+ <div class="w-full text-sm">A JavaScript library for building user interfaces.</div>
289
+ </div>
290
+ </label>
291
+ </li>
292
+ <li>
293
+ <input type="radio" id="vue-option" value="vue-option" name="technologies" class="hidden peer">
294
+ <label for="vue-option" class="inline-flex items-center justify-between w-full p-5 text-body bg-neutral-primary-soft border-1 border-default rounded-base cursor-pointer peer-checked:hover:bg-brand-softer peer-checked:border-brand-subtle peer-checked:bg-brand-softer hover:bg-neutral-secondary-medium peer-checked:text-fg-brand-strong">
295
+ <div class="block">
296
+ <svg class="mb-2 text-success w-7 h-7" fill="currentColor" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M356.9 64.3H280l-56 88.6-48-88.6H0L224 448 448 64.3h-91.1zm-301.2 32h53.8L224 294.5 338.4 96.3h53.8L224 384.5 55.7 96.3z"/></svg>
297
+ <div class="w-full font-medium mb-1">Vue Js</div>
298
+ <div class="w-full text-sm">An model–view front end JavaScript framework.</div>
299
+ </div>
300
+ </label>
301
+ </li>
302
+ <li>
303
+ <input type="radio" id="angular-option" value="angular-option" name="technologies" class="hidden peer">
304
+ <label for="angular-option" class="inline-flex items-center justify-between w-full p-5 text-body bg-neutral-primary-soft border-1 border-default rounded-base cursor-pointer peer-checked:hover:bg-brand-softer peer-checked:border-brand-subtle peer-checked:bg-brand-softer hover:bg-neutral-secondary-medium peer-checked:text-fg-brand-strong">
305
+ <div class="block">
306
+ <svg class="mb-2 text-danger w-7 h-7" fill="currentColor" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M185.7 268.1h76.2l-38.1-91.6-38.1 91.6zM223.8 32L16 106.4l31.8 275.7 176 97.9 176-97.9 31.8-275.7zM354 373.8h-48.6l-26.2-65.4H168.6l-26.2 65.4H93.7L223.8 81.5z"/></svg>
307
+ <div class="w-full font-medium mb-1">Angular</div>
308
+ <div class="w-full text-sm">A TypeScript-based web application framework.</div>
309
+ </div>
310
+ </label>
311
+ </li>
312
+ </ul>
313
+
314
+ {{< /example >}}
315
+
@@ -0,0 +1,83 @@
1
+ ---
2
+ layout: docs
3
+ title: Tailwind CSS Range Slider - Flowbite
4
+ description: Get started with the range component to receive a number from the user anywhere from 1 to 100 by sliding form control horizontally based on multiple options
5
+ group: forms
6
+ toc: true
7
+ requires_js: true
8
+
9
+ previous: Toggle
10
+ previousLink: forms/toggle/
11
+ next: Floating Label
12
+ nextLink: forms/floating-label/
13
+ ---
14
+
15
+ The range component can be used as an input field to get a number from the user based on your custom selection (ie. from 1 to 100) by using a sliding animation.
16
+
17
+ The examples on this page are all coded with Tailwind CSS and requires you to install Flowbite as a plugin inside your project to obtain all the necessary stylings.
18
+
19
+ ## Range slider example
20
+
21
+ Get started with this default example with values from 1 to 100 and the default value of 50.
22
+
23
+ {{< example github="forms/range.md" show_dark=true >}}
24
+ <label for="default-range" class="block mb-2.5 text-sm font-medium text-heading">Default range</label>
25
+ <input id="default-range" type="range" value="50" class="w-full h-2 bg-neutral-quaternary rounded-full appearance-none cursor-pointer">
26
+ {{< /example >}}
27
+
28
+ ## Disabled state
29
+
30
+ Apply the `disabled` class to disallow the users from further selecting values.
31
+
32
+ {{< example github="forms/range.md" show_dark=true >}}
33
+ <label for="disabled-range" class="block mb-2.5 text-sm font-medium text-heading">Default range</label>
34
+ <input id="disabled-range" type="range" value="50" class="w-full h-2 bg-neutral-quaternary rounded-full appearance-none cursor-pointer" disabled>
35
+ {{< /example >}}
36
+
37
+ ## Min and max
38
+
39
+ Use the min and max attributes on the range component to set the limits of the range values.
40
+
41
+ {{< example github="forms/range.md" show_dark=true >}}
42
+ <label for="minmax-range" class="block mb-2.5 text-sm font-medium text-heading">Min-max range</label>
43
+ <input id="minmax-range" type="range" min="0" max="10" value="5" class="w-full h-2 bg-neutral-quaternary rounded-full appearance-none cursor-pointer">
44
+ {{< /example >}}
45
+
46
+ ## Steps
47
+
48
+ Use the step attribute on the range component to set the increment with which the values will change.
49
+
50
+ {{< example github="forms/range.md" show_dark=true >}}
51
+ <label for="steps-range" class="block mb-2.5 text-sm font-medium text-heading">Range steps</label>
52
+ <input id="steps-range" type="range" min="0" max="5" value="2.5" step="0.5" class="w-full h-2 bg-neutral-quaternary rounded-full appearance-none cursor-pointer">
53
+ {{< /example >}}
54
+
55
+ ## Sizes
56
+
57
+ Apply the small, default, and large sizes for the range component by applying the `range-sm` and `range-lg` utility classes from Flowbite and Tailwind CSS.
58
+
59
+ {{< example github="forms/range.md" show_dark=true >}}
60
+ <label for="small-range" class="block mb-2.5 text-sm font-medium text-heading">Small range</label>
61
+ <input id="small-range" type="range" value="50" class="w-full h-1 mb-6 bg-neutral-quaternary rounded-full appearance-none cursor-pointer range-sm">
62
+
63
+ <label for="medium-range" class="block mb-2.5 text-sm font-medium text-heading">Default range</label>
64
+ <input id="medium-range" type="range" value="50" class="w-full h-2 mb-6 bg-neutral-quaternary rounded-full appearance-none cursor-pointer">
65
+
66
+ <label for="large-range" class="block mb-2.5 text-sm font-medium text-heading">Large range</label>
67
+ <input id="large-range" type="range" value="50" class="w-full h-3 bg-neutral-quaternary rounded-full appearance-none cursor-pointer range-lg">
68
+ {{< /example >}}
69
+
70
+ ## Labels
71
+
72
+ Use the following example to add labels to each value milestone of the range slider component.
73
+
74
+ {{< example github="forms/range.md" show_dark=true >}}
75
+ <div class="relative mb-6">
76
+ <label for="labels-range-input" class="sr-only">Labels range</label>
77
+ <input id="labels-range-input" type="range" value="1000" min="100" max="1500" class="w-full h-2 bg-neutral-quaternary rounded-full appearance-none cursor-pointer">
78
+ <span class="text-sm text-body absolute start-0 -bottom-6">Min ($100)</span>
79
+ <span class="text-sm text-body absolute start-1/3 -translate-x-1/2 rtl:translate-x-1/2 -bottom-6">$500</span>
80
+ <span class="text-sm text-body absolute start-2/3 -translate-x-1/2 rtl:translate-x-1/2 -bottom-6">$1000</span>
81
+ <span class="text-sm text-body absolute end-0 -bottom-6">Max ($1500)</span>
82
+ </div>
83
+ {{< /example >}}