x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
<div class="space-y-12"> <div> <h3 class="mb-2 text-lg font-semibold">Badge colours and styles</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-zinc-700 dark:text-zinc-200 bg-zinc-400/15 dark:bg-zinc-400/40 rounded-md" role="status" aria-label="Default Badge"> <span>Default Badge</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-primary-700 dark:text-primary-200 bg-primary-500/15 dark:bg-primary-500/40 rounded-md" role="status" aria-label="Primary Badge"> <span>Primary Badge</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-sky-700 dark:text-sky-200 bg-sky-500/15 dark:bg-sky-500/40 rounded-md" role="status" aria-label="Info Badge"> <span>Info Badge</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-emerald-700 dark:text-emerald-200 bg-emerald-500/15 dark:bg-emerald-500/40 rounded-md" role="status" aria-label="Success Badge"> <span>Success Badge</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-yellow-700 dark:text-yellow-200 bg-yellow-500/15 dark:bg-yellow-500/40 rounded-md" role="status" aria-label="Warning Badge"> <span>Warning Badge</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-rose-700 dark:text-rose-200 bg-rose-500/15 dark:bg-rose-500/40 rounded-md" role="status" aria-label="Danger Badge"> <span>Danger Badge</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-zinc-200 dark:text-zinc-300 bg-zinc-900 dark:bg-zinc-900 rounded-md" role="status" aria-label="Dark Badge"> <span>Dark Badge</span> </span> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges with Icons and no text</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-yellow-700 dark:text-yellow-200 bg-yellow-500/15 dark:bg-yellow-500/40 rounded-md" role="status" aria-label="Warning"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-emerald-700 dark:text-emerald-200 bg-emerald-500/15 dark:bg-emerald-500/40 rounded-md" role="status" aria-label="Success"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> </span> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges different colours</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-zinc-700 dark:text-zinc-200 bg-zinc-400/15 dark:bg-zinc-400/40 rounded-md" role="status" aria-label="Gray"> <span>Gray</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-rose-700 dark:text-rose-200 bg-rose-500/15 dark:bg-rose-500/40 rounded-md" role="status" aria-label="red"> <span>red</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-yellow-700 dark:text-yellow-200 bg-yellow-500/15 dark:bg-yellow-500/40 rounded-md" role="status" aria-label="Yellow"> <span>Yellow</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-emerald-700 dark:text-emerald-200 bg-emerald-500/15 dark:bg-emerald-500/40 rounded-md" role="status" aria-label="Green"> <span>Green</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-blue-700 dark:text-blue-200 bg-blue-500/15 dark:bg-blue-500/40 rounded-md" role="status" aria-label="Blue"> <span>Blue</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-indigo-700 dark:text-indigo-200 bg-indigo-500/15 dark:bg-indigo-500/40 rounded-md" role="status" aria-label="Indigo"> <span>Indigo</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-purple-700 dark:text-purple-200 bg-purple-500/15 dark:bg-purple-500/40 rounded-md" role="status" aria-label="Purple"> <span>Purple</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-pink-700 dark:text-pink-200 bg-pink-500/15 dark:bg-pink-500/40 rounded-md" role="status" aria-label="Pink"> <span>Pink</span> </span> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges sizes</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-zinc-700 dark:text-zinc-200 bg-zinc-400/15 dark:bg-zinc-400/40 rounded-md" role="status" aria-label="Small Gray"> <span>Small Gray</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-zinc-700 dark:text-zinc-200 bg-zinc-400/15 dark:bg-zinc-400/40 rounded-md" role="status" aria-label="Medium Gray"> <span>Medium Gray</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-zinc-700 dark:text-zinc-200 bg-zinc-400/15 dark:bg-zinc-400/40 rounded-md text-base" role="status" aria-label="Base Gray"> <span>Base Gray</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-zinc-700 dark:text-zinc-200 bg-zinc-400/15 dark:bg-zinc-400/40 rounded-md" role="status" aria-label="Large Gray"> <span>Large Gray</span> </span> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges Outline</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit bg-transparent border-rose-800 text-rose-800 dark:border-rose-200 dark:text-rose-200 border rounded-md" role="status" aria-label="Outline Danger"> <span>Outline Danger</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit bg-transparent border-emerald-800 text-emerald-800 dark:border-emerald-200 dark:text-emerald-200 border rounded-md" role="status" aria-label="Outline Success"> <span>Outline Success</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit bg-transparent border-yellow-800 text-yellow-800 dark:border-yellow-800 dark:text-yellow-800 border rounded-md" role="status" aria-label="Outline Warning"> <span>Outline Warning</span> </span> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges Colours</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-rose-700 dark:text-rose-200 bg-rose-500/15 dark:bg-rose-500/40 rounded-md" role="status" aria-label="Ruby on Rails"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>Ruby on Rails</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-yellow-700 dark:text-yellow-200 bg-yellow-500/15 dark:bg-yellow-500/40 rounded-md" role="status" aria-label="JavaScript"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>JavaScript</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-sky-700 dark:text-sky-200 bg-sky-500/15 dark:bg-sky-500/40 rounded-md" role="status" aria-label="TypeScript"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>TypeScript</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-emerald-700 dark:text-emerald-200 bg-emerald-500/15 dark:bg-emerald-500/40 rounded-md" role="status" aria-label="Shell"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>Shell</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-primary-700 dark:text-primary-200 bg-primary-500/15 dark:bg-primary-500/40 rounded-md" role="status" aria-label="Go"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>Go</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-rose-700 dark:text-rose-200 bg-rose-500/15 dark:bg-rose-500/40 rounded-md" role="status" aria-label="HTML 5"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>HTML 5</span> </span> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges with icons</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-emerald-700 dark:text-emerald-200 bg-emerald-500/15 dark:bg-emerald-500/40 rounded-md" role="status" aria-label="Paid"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>Paid</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-sky-700 dark:text-sky-200 bg-sky-500/15 dark:bg-sky-500/40 rounded-md" role="status" aria-label="2 minutes ago"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>2 minutes ago</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-yellow-700 dark:text-yellow-200 bg-yellow-500/15 dark:bg-yellow-500/40 rounded-md" role="status" aria-label="Default Badge"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>Default Badge</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-rose-700 dark:text-rose-200 bg-rose-500/15 dark:bg-rose-500/40 rounded-md" role="status" aria-label="Failed"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>Failed</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-yellow-700 dark:text-yellow-200 bg-yellow-500/15 dark:bg-yellow-500/40 rounded-md" role="status" aria-label="Refunded"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>Refunded</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-primary-700 dark:text-primary-200 bg-primary-500/15 dark:bg-primary-500/40 rounded-md" role="status" aria-label="Badge"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>Badge</span> </span> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Brands Badges with leading icons</h3> <div class="flex flex-wrap gap-2 mb-4"> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-zinc-700 dark:text-zinc-200 bg-zinc-400/15 dark:bg-zinc-400/40 rounded-md" role="status" aria-label="Github"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>Github</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-sky-700 dark:text-sky-200 bg-sky-500/15 dark:bg-sky-500/40 rounded-md" role="status" aria-label="Facebook"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>Facebook</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-yellow-700 dark:text-yellow-200 bg-yellow-500/15 dark:bg-yellow-500/40 rounded-md" role="status" aria-label="Basecamp" text_size="xl2"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>Basecamp</span> </span> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Brands Badges with trailing icons</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-zinc-200 dark:text-zinc-300 bg-zinc-900 dark:bg-zinc-900 rounded-md" role="status" aria-label="Apple"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>Apple</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-primary-700 dark:text-primary-200 bg-primary-500/15 dark:bg-primary-500/40 rounded-md" role="status" aria-label="Google"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>Google</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-sky-700 dark:text-sky-200 bg-sky-500/15 dark:bg-sky-500/40 rounded-md" role="status" aria-label="twitter"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fill-current mr-1 w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle icon-desc-circle"><title id="icon-title-circle">Circle</title> <desc id="icon-desc-circle">Circle icon</desc> <circle cx="12" cy="12" r="10"></circle> </svg> <span>twitter</span> </span> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges with Close Buttons</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-yellow-700 dark:text-yellow-200 bg-yellow-500/15 dark:bg-yellow-500/40 rounded-md gap-1.5" data-controller="utilities" data-utilities-target="dismissable" role="status" aria-label="Close it!"> <span>Close it!</span> <button name="button" type="button" title="Close" class="ml-1 -mr-1 hover:bg-black/10 rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-blue-50 focus:ring-blue-600" data-action="utilities#close"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle-x icon-desc-circle-x"><title id="icon-title-circle-x">Circle-x</title> <desc id="icon-desc-circle-x">Circle-x icon</desc> <circle cx="12" cy="12" r="10"></circle> <path d="m15 9-6 6"></path> <path d="m9 9 6 6"></path> </svg> <span class="sr-only">Remove badge</span></button> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-sky-700 dark:text-sky-200 bg-sky-500/15 dark:bg-sky-500/40 rounded-md gap-1.5" data-controller="utilities" data-utilities-target="dismissable" role="status" aria-label="Click button to close!"> <span>Click button to close!</span> <button name="button" type="button" title="Close" class="ml-1 -mr-1 hover:bg-black/10 rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-blue-50 focus:ring-blue-600" data-action="utilities#close"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4 shrink-0" role="img" focusable="false" aria-labelledby="icon-title-circle-x icon-desc-circle-x"><title id="icon-title-circle-x">Circle-x</title> <desc id="icon-desc-circle-x">Circle-x icon</desc> <circle cx="12" cy="12" r="10"></circle> <path d="m15 9-6 6"></path> <path d="m9 9 6 6"></path> </svg> <span class="sr-only">Remove badge</span></button> </span> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Guthub Badges</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit dark:bg-[#121f34] text-blue-600 dark:text-blue-500 bg-sky-100 hover:text-white hover:bg-blue-600 rounded-md" role="status" aria-label="Github topic"> <span>Github topic</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit dark:bg-[#0d1116] dark:text-gray-400 text-gray-400 border dark:border-gray-700 border-gray-300 rounded-full rounded-md" role="status" aria-label="Github label"> <span>Github label</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit dark:bg-[#0d1116] text-yellow-500 border border-yellow-700 rounded-full rounded-md" role="status" aria-label="Github label archive"> <span>Github label archive</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit dark:bg-[#0d1116] text-green-600 border border-green-600 rounded-md" role="status" aria-label="Github beta"> <span>Github beta</span> </span> <a class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit dark:bg-[#0d1116] text-purple-400 border border-purple-600 cursor-pointer shadow-md shadow-gray-500/50 hover:shadow-gray-500/100 rounded-md" href="https://github.com/features/security" rel="noopener noreferrer" role="link" aria-label="Github pro"> <span>Github pro</span> </a> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges with Counters</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-primary-700 dark:text-primary-200 bg-primary-500/15 dark:bg-primary-500/40 rounded-md" role="status" aria-label="Messages"> <span>Messages</span> <span class="px-1 ml-1 bg-white bg-opacity-25 rounded-full">5</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-rose-700 dark:text-rose-200 bg-rose-500/15 dark:bg-rose-500/40 rounded-md" role="status" aria-label="Notifications"> <span>Notifications</span> <span class="px-1 ml-1 bg-white bg-opacity-25 rounded-full">10</span> </span> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Dismissible Badges</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-yellow-700 dark:text-yellow-200 bg-yellow-500/15 dark:bg-yellow-500/40 rounded-md" data-controller="utilities" data-utilities-target="dismissable" data-action="click->utilities#dismiss" role="status" aria-label="Click it!"> <span>Click it!</span> </span> <span class="inline-flex items-center px-2 py-1 text-xs whitespace-normal w-fit text-zinc-200 dark:text-zinc-300 bg-zinc-900 dark:bg-zinc-900 rounded-md" data-controller="utilities" data-utilities-target="dismissable" data-action="click->utilities#dismiss" role="status" aria-label="Click to dismiss"> <span>Click to dismiss</span> </span> </div> </div></div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<div class="space-y-12"> <div> <h3 class="mb-2 text-lg font-semibold">Badge colours and styles</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <% badges.each do |badge| %> <%= rui_badge(**badge) %> <% end %> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges with Icons and no text</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <%= rui_badge(status: :warning) do |b| %> <% b.with_icon(name: "bookmark") %> <% end %> <%= rui_badge(status: :success) do |b| %> <% b.with_icon(name: "check") %> <% end %> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges different colours</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <%= rui_badge(text: "Gray", status: :gray) %> <%= rui_badge(text: "red", status: :red) %> <%= rui_badge(text: "Yellow", status: :yellow) %> <%= rui_badge(text: "Green", status: :green) %> <%= rui_badge(text: "Blue", status: :blue) %> <%= rui_badge(text: "Indigo", status: :indigo) %> <%= rui_badge(text: "Purple", status: :purple) %> <%= rui_badge(text: "Pink", status: :pink) %> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges sizes</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <%= rui_badge(text: "Small Gray", size: :small) %> <%= rui_badge(text: "Medium Gray", size: :medium) %> <%= rui_badge(text: "Base Gray", size: :base) %> <%= rui_badge(text: "Large Gray", size: :large) %> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges Outline</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <%= rui_badge(text: "Outline Danger", outline: true, status: :danger) %> <%= rui_badge(text: "Outline Success", outline: true, status: :success) %> <%= rui_badge(text: "Outline Warning", outline: true, status: :yellow) %> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges Colours</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <%= rui_badge(status: :danger, text: "Ruby on Rails") do |badge| %> <% badge.with_icon(name: "circle-full", position: :leading, classes: 'w-3.5 h-3.5')%> <% end %> <%= rui_badge(status: :warning, text: "JavaScript") do |badge| %> <% badge.with_icon(name: "circle-full", position: :leading, classes: 'w-3.5 h-3.5')%> <% end %> <%= rui_badge(status: :info, text: "TypeScript") do |badge| %> <% badge.with_icon(name: "circle-full", position: :leading, classes: 'w-3.5 h-3.5')%> <% end %> <%= rui_badge(status: :success, text: "Shell") do |badge| %> <% badge.with_icon(name: "circle-full", position: :leading, classes: 'w-3.5 h-3.5')%> <% end %> <%= rui_badge(status: :primary, text: "Go") do |badge| %> <% badge.with_icon(name: "circle-full", position: :leading, classes: 'w-3.5 h-3.5')%> <% end %> <%= rui_badge(status: :danger, text: "HTML 5") do |badge| %> <% badge.with_icon(name: "circle-full", position: :leading, classes: 'w-3.5 h-3.5')%> <% end %> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges with icons</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <%= rui_badge(status: :success, text: "Paid") do |badge| %> <% badge.with_icon(color: :success, name: "circle-check", position: :leading, classes: 'w-4 h-4')%> <% end %> <%= rui_badge(status: :info, text: "2 minutes ago" ) do |badge| %> <% badge.with_icon(color: :info, name: "clock", position: :leading, classes: 'w-4 h-4')%> <% end %> <%= rui_badge(status: :warning, text: "Default Badge" ) do |badge| %> <% badge.with_icon(color: :warning, name: "info", position: :leading, classes: 'w-4 h-4')%> <% end %> <%= rui_badge(status: :danger, text: "Failed" ) do |badge| %> <% badge.with_icon(color: :danger, name: "warning", position: :leading, classes: 'w-4 h-4')%> <% end %> <%= rui_badge(status: :warning, text: "Refunded" ) do |badge| %> <% badge.with_icon(color: :warning, name: "receipt-text", position: :leading, classes: 'w-4 h-4')%> <% end %> <%= rui_badge(status: :primary, text: "Badge" ) do |badge| %> <% badge.with_icon(color: :primary, name: "circle-full", position: :leading, classes: 'w-4 h-4')%> <% end %> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Brands Badges with leading icons</h3> <div class="flex flex-wrap gap-2 mb-4"> <%= rui_badge(status: :default, text: "Github" ) do |badge| %> <% badge.with_icon(name: "github", position: :leading, class: "w-3 h-3") %> <% end %> <%= rui_badge(status: :info, text: "Facebook" ) do |badge| %> <% badge.with_icon(name: "facebook", position: :leading, class: "w-3 h-3") %> <% end %> <%= rui_badge(status: :warning, text: "Basecamp", text_size: :xl2 ) do |badge| %> <% badge.with_icon(name: "basecamp", position: :leading, class: "w-3 h-3") %> <% end %> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Brands Badges with trailing icons</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <%= rui_badge(status: :dark, text: "Apple" ) do |badge| %> <% badge.with_icon(name: "apple", position: :trailing, class: "w-3 h-3") %> <% end %> <%= rui_badge(status: :primary, text: "Google" ) do |badge| %> <% badge.with_icon(name: "google", position: :trailing, class: "w-3 h-3") %> <% end %> <%= rui_badge(status: :info, text: "twitter" ) do |badge| %> <% badge.with_icon(name: "twitter", position: :trailing, class: "w-3 h-3") %> <% end %> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges with Close Buttons</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <%= rui_badge(text: "Close it!", status: :warning, close_button: true) %> <%= rui_badge(text: "Click button to close!", status: :info, close_button: true) %> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Guthub Badges</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <%= rui_badge(text: "Github topic", status: :gh_topic) %> <%= rui_badge(text: "Github label", status: :gh_label) %> <%= rui_badge(text: "Github label archive", status: :gh_label_archive) %> <%= rui_badge(text: "Github beta", status: :gh_label_beta) %> <%= rui_badge(text: "Github pro", status: :gh_label_pro, url: "https://github.com/features/security") %> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Badges with Counters</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <%= rui_badge(text: "Messages", status: :primary, counter: 5) %> <%= rui_badge(text: "Notifications", status: :danger, counter: 10) %> </div> </div> <div> <h3 class="mb-2 text-lg font-semibold">Dismissible Badges</h3> <div class="inline-flex flex-wrap gap-2 items-end mt-2"> <%= rui_badge(text: "Click it!", status: :warning, dismissible: true) %> <%= rui_badge(text: "Click to dismiss", status: :dark, dismissible: true) %> </div> </div></div>
๐ท๏ธ Badge Component Overview
This preview showcases various types of badges, each with its own characteristics:
๐ Styles: Default, Primary, Info, Success, Warning, danger, Dark
๐ผ๏ธ Badges with icons
๐ซ Badges with close buttons
๐ข Badges with counters
๐จ Dismissible badges
๐ Badges with pulsing effect
๐ Badges with URLs
๐ Badges with different text sizes
๐ Badges with outline styles
Each badge demonstrates:
- Unique styling based on the specified status
- Icon integration (when applicable)
- Close button functionality (when enabled)
- Counter display (when provided)
A simple version to use it: <%= rui_badge(text: "Badge Text", status: :default) %>
For customization options, check out the 'Playground' section ๐๏ธ
No params configured.