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.
- package/LICENSE.md +21 -0
- package/README.md +324 -0
- package/build/index.js +975 -0
- package/build/server-runner.js +228 -0
- package/data/components/accordion.md +860 -0
- package/data/components/alerts.md +739 -0
- package/data/components/avatar.md +178 -0
- package/data/components/badge.md +420 -0
- package/data/components/banner.md +145 -0
- package/data/components/bottom-navigation.md +513 -0
- package/data/components/breadcrumb.md +273 -0
- package/data/components/button-group.md +410 -0
- package/data/components/buttons.md +405 -0
- package/data/components/card.md +711 -0
- package/data/components/carousel.md +858 -0
- package/data/components/chat-bubble.md +1063 -0
- package/data/components/clipboard.md +1029 -0
- package/data/components/datepicker.md +673 -0
- package/data/components/device-mockups.md +152 -0
- package/data/components/drawer.md +1353 -0
- package/data/components/dropdowns.md +1925 -0
- package/data/components/footer.md +299 -0
- package/data/components/forms.md +371 -0
- package/data/components/gallery.md +322 -0
- package/data/components/indicators.md +262 -0
- package/data/components/jumbotron.md +213 -0
- package/data/components/kbd.md +217 -0
- package/data/components/list-group.md +365 -0
- package/data/components/mega-menu.md +558 -0
- package/data/components/modal.md +1309 -0
- package/data/components/navbar.md +1053 -0
- package/data/components/pagination.md +472 -0
- package/data/components/popover.md +826 -0
- package/data/components/progress.md +95 -0
- package/data/components/qr-code.md +280 -0
- package/data/components/rating.md +323 -0
- package/data/components/sidebar.md +1067 -0
- package/data/components/skeleton.md +221 -0
- package/data/components/speed-dial.md +1270 -0
- package/data/components/spinner.md +222 -0
- package/data/components/stepper.md +271 -0
- package/data/components/tables.md +3127 -0
- package/data/components/tabs.md +808 -0
- package/data/components/timeline.md +304 -0
- package/data/components/toast.md +341 -0
- package/data/components/tooltips.md +524 -0
- package/data/components/typography.md +269 -0
- package/data/components/video.md +95 -0
- package/data/forms/checkbox.md +375 -0
- package/data/forms/file-input.md +98 -0
- package/data/forms/floating-label.md +185 -0
- package/data/forms/input-field.md +222 -0
- package/data/forms/number-input.md +1099 -0
- package/data/forms/phone-input.md +577 -0
- package/data/forms/radio.md +315 -0
- package/data/forms/range.md +83 -0
- package/data/forms/search-input.md +280 -0
- package/data/forms/select.md +259 -0
- package/data/forms/textarea.md +155 -0
- package/data/forms/timepicker.md +732 -0
- package/data/forms/toggle.md +176 -0
- package/data/plugins/charts.md +2683 -0
- package/data/plugins/datatables.md +1922 -0
- package/data/plugins/datepicker.md +5 -0
- package/data/plugins/wysiwyg.md +2377 -0
- package/data/quickstart.md +169 -0
- package/data/theme.md +231 -0
- package/data/toc.md +79 -0
- package/data/typography/blockquote.md +182 -0
- package/data/typography/headings.md +174 -0
- package/data/typography/hr.md +74 -0
- package/data/typography/images.md +168 -0
- package/data/typography/links.md +118 -0
- package/data/typography/lists.md +387 -0
- package/data/typography/paragraphs.md +186 -0
- package/data/typography/text.md +249 -0
- package/package.json +71 -0
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Tailwind CSS Gallery (Masonry) - Flowbite
|
|
4
|
+
description: Use the image gallery component based on a masonry grid layout using flex and grid classes from Tailwind CSS to show multiple pictures based on various styles
|
|
5
|
+
group: components
|
|
6
|
+
toc: true
|
|
7
|
+
|
|
8
|
+
previous: Forms
|
|
9
|
+
previousLink: components/forms/
|
|
10
|
+
next: Indicators
|
|
11
|
+
nextLink: components/indicators/
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
The gallery component can be used to show multiple images inside a masonry grid layout styles with the utility-first classes from Tailwind CSS to show a collection of pictures to your users based on various layouts, styles, sizes, and colors.
|
|
15
|
+
|
|
16
|
+
This component is recommended for usage within marketing UI interfaces and website sections when you want to show pictures of your team members, office pictures, or even case study images.
|
|
17
|
+
|
|
18
|
+
## Default gallery
|
|
19
|
+
|
|
20
|
+
Use this component to show a collection of images inside a gallery with three pictures on a row.
|
|
21
|
+
|
|
22
|
+
{{< example class="flex justify-center" github="components/gallery.md" show_dark=true >}}
|
|
23
|
+
|
|
24
|
+
<div class="grid grid-cols-2 md:grid-cols-3 gap-4">
|
|
25
|
+
<div>
|
|
26
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image.jpg" alt="">
|
|
27
|
+
</div>
|
|
28
|
+
<div>
|
|
29
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-1.jpg" alt="">
|
|
30
|
+
</div>
|
|
31
|
+
<div>
|
|
32
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-2.jpg" alt="">
|
|
33
|
+
</div>
|
|
34
|
+
<div>
|
|
35
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-3.jpg" alt="">
|
|
36
|
+
</div>
|
|
37
|
+
<div>
|
|
38
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-4.jpg" alt="">
|
|
39
|
+
</div>
|
|
40
|
+
<div>
|
|
41
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-5.jpg" alt="">
|
|
42
|
+
</div>
|
|
43
|
+
<div>
|
|
44
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-6.jpg" alt="">
|
|
45
|
+
</div>
|
|
46
|
+
<div>
|
|
47
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-7.jpg" alt="">
|
|
48
|
+
</div>
|
|
49
|
+
<div>
|
|
50
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-8.jpg" alt="">
|
|
51
|
+
</div>
|
|
52
|
+
<div>
|
|
53
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-9.jpg" alt="">
|
|
54
|
+
</div>
|
|
55
|
+
<div>
|
|
56
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-10.jpg" alt="">
|
|
57
|
+
</div>
|
|
58
|
+
<div>
|
|
59
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-11.jpg" alt="">
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
{{< /example >}}
|
|
63
|
+
|
|
64
|
+
## Masonry grid
|
|
65
|
+
|
|
66
|
+
This example can be used to show the images inside a masonry grid layouts with four columns.
|
|
67
|
+
|
|
68
|
+
{{< example class="flex justify-center" github="components/gallery.md" show_dark=true >}}
|
|
69
|
+
|
|
70
|
+
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
|
|
71
|
+
<div class="grid gap-4">
|
|
72
|
+
<div>
|
|
73
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/masonry/image.jpg" alt="">
|
|
74
|
+
</div>
|
|
75
|
+
<div>
|
|
76
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/masonry/image-1.jpg" alt="">
|
|
77
|
+
</div>
|
|
78
|
+
<div>
|
|
79
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/masonry/image-2.jpg" alt="">
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="grid gap-4">
|
|
83
|
+
<div>
|
|
84
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/masonry/image-3.jpg" alt="">
|
|
85
|
+
</div>
|
|
86
|
+
<div>
|
|
87
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/masonry/image-4.jpg" alt="">
|
|
88
|
+
</div>
|
|
89
|
+
<div>
|
|
90
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/masonry/image-5.jpg" alt="">
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
<div class="grid gap-4">
|
|
94
|
+
<div>
|
|
95
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/masonry/image-6.jpg" alt="">
|
|
96
|
+
</div>
|
|
97
|
+
<div>
|
|
98
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/masonry/image-7.jpg" alt="">
|
|
99
|
+
</div>
|
|
100
|
+
<div>
|
|
101
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/masonry/image-8.jpg" alt="">
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="grid gap-4">
|
|
105
|
+
<div>
|
|
106
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/masonry/image-9.jpg" alt="">
|
|
107
|
+
</div>
|
|
108
|
+
<div>
|
|
109
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/masonry/image-10.jpg" alt="">
|
|
110
|
+
</div>
|
|
111
|
+
<div>
|
|
112
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/masonry/image-11.jpg" alt="">
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
{{< /example >}}
|
|
117
|
+
|
|
118
|
+
## Featured image
|
|
119
|
+
|
|
120
|
+
This example can be used to feature the most important image and show a row of five pictures below.
|
|
121
|
+
|
|
122
|
+
{{< example class="flex justify-center" github="components/gallery.md" show_dark=true >}}
|
|
123
|
+
|
|
124
|
+
<div class="grid gap-4">
|
|
125
|
+
<div>
|
|
126
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/featured/image.jpg" alt="">
|
|
127
|
+
</div>
|
|
128
|
+
<div class="grid grid-cols-5 gap-4">
|
|
129
|
+
<div>
|
|
130
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-1.jpg" alt="">
|
|
131
|
+
</div>
|
|
132
|
+
<div>
|
|
133
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-2.jpg" alt="">
|
|
134
|
+
</div>
|
|
135
|
+
<div>
|
|
136
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-3.jpg" alt="">
|
|
137
|
+
</div>
|
|
138
|
+
<div>
|
|
139
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-4.jpg" alt="">
|
|
140
|
+
</div>
|
|
141
|
+
<div>
|
|
142
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-5.jpg" alt="">
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
{{< /example >}}
|
|
147
|
+
|
|
148
|
+
## Quad gallery
|
|
149
|
+
|
|
150
|
+
Use this example to show four larger images with two items on a row.
|
|
151
|
+
|
|
152
|
+
{{< example class="flex justify-center" github="components/gallery.md" show_dark=true >}}
|
|
153
|
+
|
|
154
|
+
<div class="grid grid-cols-2 gap-2">
|
|
155
|
+
<div>
|
|
156
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-1.jpg" alt="">
|
|
157
|
+
</div>
|
|
158
|
+
<div>
|
|
159
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-2.jpg" alt="">
|
|
160
|
+
</div>
|
|
161
|
+
<div>
|
|
162
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-3.jpg" alt="">
|
|
163
|
+
</div>
|
|
164
|
+
<div>
|
|
165
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-4.jpg" alt="">
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
{{< /example >}}
|
|
169
|
+
|
|
170
|
+
<div class="mt-8 -mb-5">
|
|
171
|
+
{{< requires_js >}}
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
## Gallery with slider
|
|
175
|
+
|
|
176
|
+
This example uses the [carousel slider](https://flowbite.com/docs/components/carousel/) functionality to show multiple images inside a slider gallery.
|
|
177
|
+
|
|
178
|
+
{{< example class="flex justify-center" github="components/gallery.md" show_dark=true >}}
|
|
179
|
+
|
|
180
|
+
<div id="gallery" class="relative w-full" data-carousel="slide">
|
|
181
|
+
<!-- Carousel wrapper -->
|
|
182
|
+
<div class="relative h-56 overflow-hidden rounded-lg md:h-96">
|
|
183
|
+
<!-- Item 1 -->
|
|
184
|
+
<div class="hidden duration-700 ease-in-out" data-carousel-item>
|
|
185
|
+
<img src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-1.jpg" class="absolute block max-w-full h-auto -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2" alt="">
|
|
186
|
+
</div>
|
|
187
|
+
<!-- Item 2 -->
|
|
188
|
+
<div class="hidden duration-700 ease-in-out" data-carousel-item="active">
|
|
189
|
+
<img src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-2.jpg" class="absolute block max-w-full h-auto -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2" alt="">
|
|
190
|
+
</div>
|
|
191
|
+
<!-- Item 3 -->
|
|
192
|
+
<div class="hidden duration-700 ease-in-out" data-carousel-item>
|
|
193
|
+
<img src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-3.jpg" class="absolute block max-w-full h-auto -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2" alt="">
|
|
194
|
+
</div>
|
|
195
|
+
<!-- Item 4 -->
|
|
196
|
+
<div class="hidden duration-700 ease-in-out" data-carousel-item>
|
|
197
|
+
<img src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-4.jpg" class="absolute block max-w-full h-auto -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2" alt="">
|
|
198
|
+
</div>
|
|
199
|
+
<!-- Item 5 -->
|
|
200
|
+
<div class="hidden duration-700 ease-in-out" data-carousel-item>
|
|
201
|
+
<img src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-5.jpg" class="absolute block max-w-full h-auto -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2" alt="">
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
<!-- Slider controls -->
|
|
205
|
+
<button type="button" class="absolute top-0 start-0 z-30 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none" data-carousel-prev>
|
|
206
|
+
<span class="inline-flex items-center justify-center w-10 h-10 rounded-full bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
|
|
207
|
+
<svg class="w-5 h-5 text-white 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="m15 19-7-7 7-7"/></svg>
|
|
208
|
+
<span class="sr-only">Previous</span>
|
|
209
|
+
</span>
|
|
210
|
+
</button>
|
|
211
|
+
<button type="button" class="absolute top-0 end-0 z-30 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none" data-carousel-next>
|
|
212
|
+
<span class="inline-flex items-center justify-center w-10 h-10 rounded-full bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
|
|
213
|
+
<svg class="w-5 h-5 text-white 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="m9 5 7 7-7 7"/></svg>
|
|
214
|
+
<span class="sr-only">Next</span>
|
|
215
|
+
</span>
|
|
216
|
+
</button>
|
|
217
|
+
</div>
|
|
218
|
+
{{< /example >}}
|
|
219
|
+
|
|
220
|
+
<div class="mt-8 -mb-5">
|
|
221
|
+
{{< requires_js >}}
|
|
222
|
+
</div>
|
|
223
|
+
|
|
224
|
+
## Custom slider controls
|
|
225
|
+
|
|
226
|
+
This example uses an alternative style for the control button for the carousel slider component.
|
|
227
|
+
|
|
228
|
+
{{< example class="flex justify-center" github="components/gallery.md" show_dark=true >}}
|
|
229
|
+
|
|
230
|
+
<div id="custom-controls-gallery" class="relative w-full" data-carousel="slide">
|
|
231
|
+
<!-- Carousel wrapper -->
|
|
232
|
+
<div class="relative h-56 overflow-hidden rounded-lg md:h-96">
|
|
233
|
+
<!-- Item 1 -->
|
|
234
|
+
<div class="hidden duration-700 ease-in-out" data-carousel-item>
|
|
235
|
+
<img src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-1.jpg" class="absolute block max-w-full h-auto -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2" alt="">
|
|
236
|
+
</div>
|
|
237
|
+
<!-- Item 2 -->
|
|
238
|
+
<div class="hidden duration-700 ease-in-out" data-carousel-item="active">
|
|
239
|
+
<img src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-2.jpg" class="absolute block max-w-full h-auto -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2" alt="">
|
|
240
|
+
</div>
|
|
241
|
+
<!-- Item 3 -->
|
|
242
|
+
<div class="hidden duration-700 ease-in-out" data-carousel-item>
|
|
243
|
+
<img src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-3.jpg" class="absolute block max-w-full h-auto -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2" alt="">
|
|
244
|
+
</div>
|
|
245
|
+
<!-- Item 4 -->
|
|
246
|
+
<div class="hidden duration-700 ease-in-out" data-carousel-item>
|
|
247
|
+
<img src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-4.jpg" class="absolute block max-w-full h-auto -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2" alt="">
|
|
248
|
+
</div>
|
|
249
|
+
<!-- Item 5 -->
|
|
250
|
+
<div class="hidden duration-700 ease-in-out" data-carousel-item>
|
|
251
|
+
<img src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-5.jpg" class="absolute block max-w-full h-auto -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2" alt="">
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
<div class="flex justify-center items-center pt-4">
|
|
255
|
+
<button type="button" class="flex justify-center items-center me-4 h-full cursor-pointer group focus:outline-none" data-carousel-prev>
|
|
256
|
+
<span class="text-body hover:text-heading group-focus:text-heading">
|
|
257
|
+
<svg class="rtl:rotate-180 w-6 h-6" 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 12h14M5 12l4-4m-4 4 4 4"/></svg>
|
|
258
|
+
<span class="sr-only">Previous</span>
|
|
259
|
+
</span>
|
|
260
|
+
</button>
|
|
261
|
+
<button type="button" class="flex justify-center items-center h-full cursor-pointer group focus:outline-none" data-carousel-next>
|
|
262
|
+
<span class="text-body hover:text-heading group-focus:text-heading">
|
|
263
|
+
<svg class="rtl:rotate-180 w-6 h-6" 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>
|
|
264
|
+
<span class="sr-only">Next</span>
|
|
265
|
+
</span>
|
|
266
|
+
</button>
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
{{< /example >}}
|
|
270
|
+
|
|
271
|
+
## Gallery with tag filters
|
|
272
|
+
|
|
273
|
+
Use this example to show a list of tags and filter the images below based on the activately selected tag.
|
|
274
|
+
|
|
275
|
+
{{< example bodyClass="mt-0" github="components/gallery.md" show_dark=true >}}
|
|
276
|
+
|
|
277
|
+
<div class="flex items-center justify-center py-4 md:py-8 flex-wrap">
|
|
278
|
+
<button type="button" class="text-fg-brand border border-brand bg-neutral-primary focus:ring-4 focus:outline-none focus:ring-neutral-tertiary rounded-base text-base font-medium px-5 py-2.5 text-center me-3 mb-3">All categories</button>
|
|
279
|
+
<button type="button" class="text-heading border border-buffer hover:border-default bg-neutral-primary focus:ring-4 focus:outline-none focus:ring-neutral-tertiary rounded-base text-base font-medium px-5 py-2.5 text-center me-3 mb-3">Shoes</button>
|
|
280
|
+
<button type="button" class="text-heading border border-buffer hover:border-default bg-neutral-primary focus:ring-4 focus:outline-none focus:ring-neutral-tertiary rounded-base text-base font-medium px-5 py-2.5 text-center me-3 mb-3">Bags</button>
|
|
281
|
+
<button type="button" class="text-heading border border-buffer hover:border-default bg-neutral-primary focus:ring-4 focus:outline-none focus:ring-neutral-tertiary rounded-base text-base font-medium px-5 py-2.5 text-center me-3 mb-3">Electronics</button>
|
|
282
|
+
<button type="button" class="text-heading border border-buffer hover:border-default bg-neutral-primary focus:ring-4 focus:outline-none focus:ring-neutral-tertiary rounded-base text-base font-medium px-5 py-2.5 text-center me-3 mb-3">Gaming</button>
|
|
283
|
+
</div>
|
|
284
|
+
<div class="grid grid-cols-2 md:grid-cols-3 gap-4">
|
|
285
|
+
<div>
|
|
286
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image.jpg" alt="">
|
|
287
|
+
</div>
|
|
288
|
+
<div>
|
|
289
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-1.jpg" alt="">
|
|
290
|
+
</div>
|
|
291
|
+
<div>
|
|
292
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-2.jpg" alt="">
|
|
293
|
+
</div>
|
|
294
|
+
<div>
|
|
295
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-3.jpg" alt="">
|
|
296
|
+
</div>
|
|
297
|
+
<div>
|
|
298
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-4.jpg" alt="">
|
|
299
|
+
</div>
|
|
300
|
+
<div>
|
|
301
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-5.jpg" alt="">
|
|
302
|
+
</div>
|
|
303
|
+
<div>
|
|
304
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-6.jpg" alt="">
|
|
305
|
+
</div>
|
|
306
|
+
<div>
|
|
307
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-7.jpg" alt="">
|
|
308
|
+
</div>
|
|
309
|
+
<div>
|
|
310
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-8.jpg" alt="">
|
|
311
|
+
</div>
|
|
312
|
+
<div>
|
|
313
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-9.jpg" alt="">
|
|
314
|
+
</div>
|
|
315
|
+
<div>
|
|
316
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-10.jpg" alt="">
|
|
317
|
+
</div>
|
|
318
|
+
<div>
|
|
319
|
+
<img class="h-auto max-w-full rounded-base" src="https://flowbite.s3.amazonaws.com/docs/gallery/square/image-11.jpg" alt="">
|
|
320
|
+
</div>
|
|
321
|
+
</div>
|
|
322
|
+
{{< /example >}}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Tailwind CSS Indicators - Flowbite
|
|
4
|
+
description: Use the indicator component to show a number count, account status, or as a loading label positioned relative to the parent component coded with Tailwind CSS
|
|
5
|
+
group: components
|
|
6
|
+
toc: true
|
|
7
|
+
|
|
8
|
+
previous: Gallery
|
|
9
|
+
previousLink: components/gallery/
|
|
10
|
+
next: Jumbotron
|
|
11
|
+
nextLink: components/jumbotron/
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
The indicator component can be used as a small element positioned absolutely relative to another component such as a button or card and show a number count, account status (red for offline, green for online) and other useful information.
|
|
15
|
+
|
|
16
|
+
Check out the following examples for multiple sizes, colors, positionings, styles, and more all coded with Tailwind CSS and Flowbite.
|
|
17
|
+
|
|
18
|
+
## Default indicator
|
|
19
|
+
|
|
20
|
+
Use this example to create a simple indicator with multiple colors and position it anywhere on the website.
|
|
21
|
+
|
|
22
|
+
{{< example class="flex items-center justify-center" github="components/indicators.md" show_dark=true >}}
|
|
23
|
+
<span class="flex w-3 h-3 me-3 bg-neutral-quaternary rounded-full"></span>
|
|
24
|
+
<span class="flex w-3 h-3 me-3 bg-dark rounded-full"></span>
|
|
25
|
+
<span class="flex w-3 h-3 me-3 bg-brand rounded-full"></span>
|
|
26
|
+
<span class="flex w-3 h-3 me-3 bg-success rounded-full"></span>
|
|
27
|
+
<span class="flex w-3 h-3 me-3 bg-danger rounded-full"></span>
|
|
28
|
+
<span class="flex w-3 h-3 me-3 bg-purple rounded-full"></span>
|
|
29
|
+
<span class="flex w-3 h-3 me-3 bg-indigo rounded-full"></span>
|
|
30
|
+
<span class="flex w-3 h-3 me-3 bg-warning rounded-full"></span>
|
|
31
|
+
<span class="flex w-3 h-3 me-3 bg-teal rounded-full"></span>
|
|
32
|
+
{{< /example >}}
|
|
33
|
+
|
|
34
|
+
## Legend indicator
|
|
35
|
+
|
|
36
|
+
This example can be used as a legend indicator for charts to also add a text next to the bullet point.
|
|
37
|
+
|
|
38
|
+
{{< example class="flex items-center justify-center" github="components/indicators.md" show_dark=true >}}
|
|
39
|
+
<span class="flex items-center text-sm font-medium text-heading me-3"><span class="flex w-2.5 h-2.5 bg-brand rounded-full me-1.5 shrink-0"></span>Visitors</span>
|
|
40
|
+
<span class="flex items-center text-sm font-medium text-heading me-3"><span class="flex w-2.5 h-2.5 bg-purple rounded-full me-1.5 shrink-0"></span>Sessions</span>
|
|
41
|
+
<span class="flex items-center text-sm font-medium text-heading me-3"><span class="flex w-2.5 h-2.5 bg-indigo rounded-full me-1.5 shrink-0"></span>Customers</span>
|
|
42
|
+
<span class="flex items-center text-sm font-medium text-heading me-3"><span class="flex w-2.5 h-2.5 bg-teal rounded-full me-1.5 shrink-0"></span>Revenue</span>
|
|
43
|
+
{{< /example >}}
|
|
44
|
+
|
|
45
|
+
## Indicator count
|
|
46
|
+
|
|
47
|
+
This example can be used to show a number count inside the indicator and position it relative to a button component.
|
|
48
|
+
|
|
49
|
+
{{< example github="components/indicators.md" class="flex items-center justify-center" show_dark=true >}}
|
|
50
|
+
<button type="button" class="relative inline-flex items-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">
|
|
51
|
+
<svg class="w-4 h-4 me-1.5 -ms-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="M4 13h3.439a.991.991 0 0 1 .908.6 3.978 3.978 0 0 0 7.306 0 .99.99 0 0 1 .908-.6H20M4 13v6a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-6M4 13l2-9h12l2 9M9 7h6m-7 3h8"/></svg>
|
|
52
|
+
<span class="sr-only">Notifications</span>
|
|
53
|
+
Messages
|
|
54
|
+
<div class="absolute inline-flex items-center justify-center w-6 h-6 text-xs font-bold text-white bg-danger border-2 border-buffer rounded-full -top-2 -end-2">8</div>
|
|
55
|
+
</button>
|
|
56
|
+
{{< /example >}}
|
|
57
|
+
|
|
58
|
+
## Status indicator
|
|
59
|
+
|
|
60
|
+
Use this example to show a status indicator for the currently logged in user by showing red for offline and green for online.
|
|
61
|
+
|
|
62
|
+
{{< example github="components/indicators.md" class="flex items-center justify-center" show_dark=true >}}
|
|
63
|
+
|
|
64
|
+
<div class="relative me-4">
|
|
65
|
+
<img class="w-10 h-10 rounded-full" src="/docs/images/people/profile-picture-5.jpg" alt="profile image">
|
|
66
|
+
<span class="top-0 start-7 absolute w-3.5 h-3.5 bg-success border-2 border-buffer rounded-full"></span>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="relative">
|
|
69
|
+
<img class="w-10 h-10 rounded-full" src="/docs/images/people/profile-picture-5.jpg" alt="profile image">
|
|
70
|
+
<span class="top-0 start-7 absolute w-3.5 h-3.5 bg-danger border-2 border-buffer rounded-full"></span>
|
|
71
|
+
</div>
|
|
72
|
+
{{< /example >}}
|
|
73
|
+
|
|
74
|
+
## Badge indicator
|
|
75
|
+
|
|
76
|
+
This example can be used to add an indicator inside of a badge component.
|
|
77
|
+
|
|
78
|
+
{{< example github="components/indicators.md" class="flex items-center justify-center" show_dark=true >}}
|
|
79
|
+
|
|
80
|
+
<ul role="list" class="max-w-md divide-y divide-default">
|
|
81
|
+
<li class="py-3 sm:py-4">
|
|
82
|
+
<div class="flex items-center space-x-3 rtl:space-x-reverse">
|
|
83
|
+
<div class="shrink-0">
|
|
84
|
+
<img class="w-8 h-8 rounded-full" src="/docs/images/people/profile-picture-5.jpg" alt="Neil image">
|
|
85
|
+
</div>
|
|
86
|
+
<div class="flex-1 min-w-0">
|
|
87
|
+
<p class="text-sm font-semibold text-heading truncate">
|
|
88
|
+
Neil Sims
|
|
89
|
+
</p>
|
|
90
|
+
<p class="text-sm text-body truncate ">
|
|
91
|
+
email@flowbite.com
|
|
92
|
+
</p>
|
|
93
|
+
</div>
|
|
94
|
+
<span class="inline-flex items-center bg-success-soft border border-success-subtle text-fg-success-strong text-xs font-medium px-1.5 py-0.5 rounded-sm">
|
|
95
|
+
<span class="w-2 h-2 me-1 bg-success rounded-full"></span>
|
|
96
|
+
Available
|
|
97
|
+
</span>
|
|
98
|
+
</div>
|
|
99
|
+
</li>
|
|
100
|
+
<li class="py-3 sm:py-4">
|
|
101
|
+
<div class="flex items-center space-x-3 rtl:space-x-reverse">
|
|
102
|
+
<div class="shrink-0">
|
|
103
|
+
<img class="w-8 h-8 rounded-full" src="/docs/images/people/profile-picture-4.jpg" alt="Neil image">
|
|
104
|
+
</div>
|
|
105
|
+
<div class="flex-1 min-w-0">
|
|
106
|
+
<p class="text-sm font-semibold text-heading truncate">
|
|
107
|
+
Bonnie Green
|
|
108
|
+
</p>
|
|
109
|
+
<p class="text-sm text-body truncate ">
|
|
110
|
+
email@flowbite.com
|
|
111
|
+
</p>
|
|
112
|
+
</div>
|
|
113
|
+
<span class="inline-flex items-center bg-danger-soft border border-danger-subtle text-fg-danger-strong text-xs font-medium px-1.5 py-0.5 rounded-sm">
|
|
114
|
+
<span class="w-2 h-2 me-1 bg-danger rounded-full"></span>
|
|
115
|
+
Unavailable
|
|
116
|
+
</span>
|
|
117
|
+
</div>
|
|
118
|
+
</li>
|
|
119
|
+
</ul>
|
|
120
|
+
{{< /example >}}
|
|
121
|
+
|
|
122
|
+
## Stepper indicator
|
|
123
|
+
|
|
124
|
+
You can also use the indicators inside of a stepper component when completing a form element.
|
|
125
|
+
|
|
126
|
+
{{< example class="space-y-8" github="components/indicators.md" show_dark=true >}}
|
|
127
|
+
|
|
128
|
+
<ol class="flex items-center">
|
|
129
|
+
<li class="relative w-full mb-6">
|
|
130
|
+
<div class="flex items-center">
|
|
131
|
+
<div class="z-10 flex items-center justify-center w-6 h-6 bg-brand rounded-full ring-0 ring-buffer sm:ring-8 shrink-0">
|
|
132
|
+
<svg class="w-4 h-4 text-white" 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 11.917 9.724 16.5 19 7.5"/></svg>
|
|
133
|
+
</div>
|
|
134
|
+
<div class="flex w-full bg-base h-0.5"></div>
|
|
135
|
+
</div>
|
|
136
|
+
<div class="mt-3">
|
|
137
|
+
<h3 class="font-medium text-heading">Step 1</h3>
|
|
138
|
+
</div>
|
|
139
|
+
</li>
|
|
140
|
+
<li class="relative w-full mb-6">
|
|
141
|
+
<div class="flex items-center">
|
|
142
|
+
<div class="z-10 flex items-center justify-center w-6 h-6 bg-brand rounded-full ring-0 ring-buffer sm:ring-8 shrink-0">
|
|
143
|
+
<svg class="w-4 h-4 text-white" 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 11.917 9.724 16.5 19 7.5"/></svg>
|
|
144
|
+
</div>
|
|
145
|
+
<div class="flex w-full bg-base h-0.5"></div>
|
|
146
|
+
</div>
|
|
147
|
+
<div class="mt-3">
|
|
148
|
+
<h3 class="font-medium text-heading">Step 2</h3>
|
|
149
|
+
</div>
|
|
150
|
+
</li>
|
|
151
|
+
<li class="relative w-full mb-6">
|
|
152
|
+
<div class="flex items-center">
|
|
153
|
+
<div class="z-10 flex items-center justify-center w-6 h-6 bg-brand rounded-full ring-0 ring-buffer sm:ring-8 shrink-0">
|
|
154
|
+
<svg class="w-4 h-4 text-white" 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 11.917 9.724 16.5 19 7.5"/></svg>
|
|
155
|
+
</div>
|
|
156
|
+
<div class="flex w-full bg-base h-0.5"></div>
|
|
157
|
+
</div>
|
|
158
|
+
<div class="mt-3">
|
|
159
|
+
<h3 class="font-medium text-heading">Step 2</h3>
|
|
160
|
+
</div>
|
|
161
|
+
</li>
|
|
162
|
+
<li class="relative w-full mb-6">
|
|
163
|
+
<div class="flex items-center">
|
|
164
|
+
<div class="z-10 flex items-center justify-center w-6 h-6 bg-neutral-tertiary rounded-full ring-0 ring-buffer sm:ring-8 shrink-0">
|
|
165
|
+
<svg class="w-4 h-4 text-heading" 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 11.917 9.724 16.5 19 7.5"/></svg>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
<div class="mt-3">
|
|
169
|
+
<h3 class="font-medium text-heading">Step 3</h3>
|
|
170
|
+
</div>
|
|
171
|
+
</li>
|
|
172
|
+
</ol>
|
|
173
|
+
<ol class="flex items-center">
|
|
174
|
+
<li class="relative w-full mb-6">
|
|
175
|
+
<div class="flex items-center">
|
|
176
|
+
<div class="z-10 flex items-center justify-center w-6 h-6 bg-brand-subtle rounded-full ring-0 ring-buffer sm:ring-8 shrink-0">
|
|
177
|
+
<span class="flex w-3 h-3 bg-brand rounded-full"></span>
|
|
178
|
+
</div>
|
|
179
|
+
<div class="flex w-full bg-base h-0.5"></div>
|
|
180
|
+
</div>
|
|
181
|
+
<div class="mt-3">
|
|
182
|
+
<h3 class="font-medium text-heading">Step 1</h3>
|
|
183
|
+
</div>
|
|
184
|
+
</li>
|
|
185
|
+
<li class="relative w-full mb-6">
|
|
186
|
+
<div class="flex items-center">
|
|
187
|
+
<div class="z-10 flex items-center justify-center w-6 h-6 bg-brand-subtle rounded-full ring-0 ring-buffer sm:ring-8 shrink-0">
|
|
188
|
+
<span class="flex w-3 h-3 bg-brand rounded-full"></span>
|
|
189
|
+
</div>
|
|
190
|
+
<div class="flex w-full bg-base h-0.5"></div>
|
|
191
|
+
</div>
|
|
192
|
+
<div class="mt-3">
|
|
193
|
+
<h3 class="font-medium text-heading">Step 2</h3>
|
|
194
|
+
</div>
|
|
195
|
+
</li>
|
|
196
|
+
<li class="relative w-full mb-6">
|
|
197
|
+
<div class="flex items-center">
|
|
198
|
+
<div class="z-10 flex items-center justify-center w-6 h-6 bg-brand-subtle rounded-full ring-0 ring-buffer sm:ring-8 shrink-0">
|
|
199
|
+
<span class="flex w-3 h-3 bg-brand rounded-full"></span>
|
|
200
|
+
</div>
|
|
201
|
+
<div class="flex w-full bg-base h-0.5"></div>
|
|
202
|
+
</div>
|
|
203
|
+
<div class="mt-3">
|
|
204
|
+
<h3 class="font-medium text-heading">Step 2</h3>
|
|
205
|
+
</div>
|
|
206
|
+
</li>
|
|
207
|
+
<li class="relative w-full mb-6">
|
|
208
|
+
<div class="flex items-center">
|
|
209
|
+
<div class="z-10 flex items-center justify-center w-6 h-6 bg-neutral-tertiary rounded-full ring-0 ring-buffer sm:ring-8 shrink-0">
|
|
210
|
+
<span class="flex w-3 h-3 bg-heading rounded-full"></span>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
<div class="mt-3">
|
|
214
|
+
<h3 class="font-medium text-heading">Step 3</h3>
|
|
215
|
+
</div>
|
|
216
|
+
</li>
|
|
217
|
+
</ol>
|
|
218
|
+
{{< /example >}}
|
|
219
|
+
|
|
220
|
+
## Loading indicator
|
|
221
|
+
|
|
222
|
+
Use this animated loading indicator when content inside of a card is still loading.
|
|
223
|
+
|
|
224
|
+
{{< example class="space-y-8 flex items-center justify-center" github="components/indicators.md" show_dark=true >}}
|
|
225
|
+
|
|
226
|
+
<div class="flex items-center justify-center bg-neutral-secondary-soft h-56 w-56 border border-default text-fg-brand-strong text-xs font-medium rounded-base">
|
|
227
|
+
<div class="px-2 py-px ring-1 ring-inset ring-brand-subtle text-fg-brand-strong text-xs font-medium rounded-sm bg-brand-softer animate-pulse">loading...</div>
|
|
228
|
+
</div>
|
|
229
|
+
{{< /example >}}
|
|
230
|
+
|
|
231
|
+
## Spinner indicator
|
|
232
|
+
|
|
233
|
+
Use this animated spinner component inside of a card component that hasn't loaded yet.
|
|
234
|
+
|
|
235
|
+
{{< example class="space-y-8 flex items-center justify-center" github="components/indicators.md" show_dark=true >}}
|
|
236
|
+
|
|
237
|
+
<div class="flex items-center justify-center bg-neutral-secondary-soft h-56 w-56 border border-default text-fg-brand-strong text-xs font-medium rounded-base">
|
|
238
|
+
<div role="status">
|
|
239
|
+
<svg aria-hidden="true" class="w-8 h-8 text-neutral-quaternary animate-spin fill-brand" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg"><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"/><path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/></svg>
|
|
240
|
+
<span class="sr-only">Loading...</span>
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
{{< /example >}}
|
|
244
|
+
|
|
245
|
+
## Indicator position
|
|
246
|
+
|
|
247
|
+
Use these examples to position the indicator component anywhere relative to the parent element.
|
|
248
|
+
|
|
249
|
+
{{< example class="flex items-center justify-center space-y-8" github="components/indicators.md" show_dark=true >}}
|
|
250
|
+
|
|
251
|
+
<div class="relative bg-neutral-secondary-soft h-56 w-56 border border-default text-fg-brand-strong text-xs font-medium rounded-base">
|
|
252
|
+
<span class="bg-brand-softer text-xs font-medium text-fg-brand text-center p-0.5 ring-1 ring-inset ring-brand-subtle rounded-base px-2 absolute -translate-y-1/2 translate-x-1/2 right-1/2">top-center</span>
|
|
253
|
+
<span class="bg-brand-softer text-xs font-medium text-fg-brand text-center p-0.5 ring-1 ring-inset ring-brand-subtle rounded-base px-2 absolute -translate-y-1/2 -translate-x-1/2 right-auto top-0 left-0">top-left</span>
|
|
254
|
+
<span class="bg-brand-softer text-xs font-medium text-fg-brand text-center p-0.5 ring-1 ring-inset ring-brand-subtle rounded-base px-2 absolute -translate-y-1/2 translate-x-1/2 left-auto top-0 right-0">top-right</span>
|
|
255
|
+
<span class="bg-brand-softer text-xs font-medium text-fg-brand text-center p-0.5 ring-1 ring-inset ring-brand-subtle rounded-base px-2 absolute -translate-y-1/2 -translate-x-1/2 top-2/4 left-1/2">middle-center</span>
|
|
256
|
+
<span class="bg-brand-softer text-xs font-medium text-fg-brand text-center p-0.5 ring-1 ring-inset ring-brand-subtle rounded-base px-2 absolute -translate-y-1/2 -translate-x-1/2 right-auto left-0 top-2/4">middle-left</span>
|
|
257
|
+
<span class="bg-brand-softer text-xs font-medium text-fg-brand text-center p-0.5 ring-1 ring-inset ring-brand-subtle rounded-base px-2 absolute -translate-y-1/2 translate-x-1/2 left-auto right-0 top-2/4">middle-right</span>
|
|
258
|
+
<span class="bg-brand-softer text-xs font-medium text-fg-brand text-center p-0.5 ring-1 ring-inset ring-brand-subtle rounded-base px-2 absolute translate-y-1/2 translate-x-1/2 bottom-0 right-1/2">bottom-center</span>
|
|
259
|
+
<span class="bg-brand-softer text-xs font-medium text-fg-brand text-center p-0.5 ring-1 ring-inset ring-brand-subtle rounded-base px-2 absolute translate-y-1/2 -translate-x-1/2 right-auto bottom-0 left-0">bottom-left</span>
|
|
260
|
+
<span class="bg-brand-softer text-xs font-medium text-fg-brand text-center p-0.5 ring-1 ring-inset ring-brand-subtle rounded-base px-2 absolute translate-y-1/2 translate-x-1/2 left-auto bottom-0 right-0">bottom-right</span>
|
|
261
|
+
</div>
|
|
262
|
+
{{< /example >}}
|