|
23 | 23 | </script> |
24 | 24 | </head> |
25 | 25 | <body> |
26 | | - <div class="flex flex-col container mx-auto my-20 gap-5"> |
| 26 | + <div class="flex flex-col container mx-auto my-20 gap-5 px-5"> |
27 | 27 | <h1 class="font-bold text-xl">Rapidez Blade Components preview</h1> |
28 | 28 |
|
29 | 29 | <h2 class="font-bold text-lg">Input components</h2> |
30 | 30 |
|
31 | | - <div class="grid grid-cols-3 gap-5 [&>fieldset]:border [&>fieldset]:rounded [&>fieldset]:p-5"> |
| 31 | + <div class="grid grid-cols-1 lg:grid-cols-3 gap-5 [&>fieldset]:border [&>fieldset]:rounded [&>fieldset]:p-5"> |
32 | 32 | <h3 class="font-bold text-md">Base components</h3> |
33 | 33 | <h3 class="font-bold text-md">Components with a label</h3> |
34 | 34 | <h3 class="font-bold text-md">Components with a required label</h3> |
@@ -162,6 +162,201 @@ <h2 class="font-bold text-lg">Button components</h2> |
162 | 162 |
|
163 | 163 | <h2 class="font-bold text-lg">Slideover component</h2> |
164 | 164 | Soon... |
| 165 | + |
| 166 | + <h2 class="font-bold text-lg">Accordion component</h2> |
| 167 | + |
| 168 | + <div class="grid grid-cols-1 lg:grid-cols-3 gap-5"> |
| 169 | + <div class="flex flex-col gap-3"> |
| 170 | + <h3 class="font-bold text-md">Default</h3> |
| 171 | + <div class="flex flex-col group rounded border p-3"> |
| 172 | + <input |
| 173 | + id="checkbox-question-1" |
| 174 | + name="" |
| 175 | + type="checkbox" |
| 176 | + class="peer hidden" |
| 177 | + /> |
| 178 | + <label |
| 179 | + for="checkbox-question-1" |
| 180 | + class="flex items-center gap-2 justify-between cursor-pointer font-bold" |
| 181 | + > |
| 182 | + Question 1 |
| 183 | + </label> |
| 184 | + <div class="grid peer-checked:grid-rows-[1fr] grid-rows-[0fr] transition-all"> |
| 185 | + <div class="overflow-hidden"> |
| 186 | + Lorem ipsum dolor, sit, amet consectetur adipisicing elit. Reprehenderit eum in deleniti dicta ducimus perspiciatis provident tempore. Consequuntur nemo blanditiis delectus, quasi velit illum ipsa quibusdam maiores cupiditate itaque repellendus. |
| 187 | + </div> |
| 188 | + </div> |
| 189 | +</div> |
| 190 | + <div class="flex flex-col group rounded border p-3"> |
| 191 | + <input |
| 192 | + id="checkbox-question-2" |
| 193 | + name="" |
| 194 | + type="checkbox" |
| 195 | + class="peer hidden" |
| 196 | + /> |
| 197 | + <label |
| 198 | + for="checkbox-question-2" |
| 199 | + class="flex items-center gap-2 justify-between cursor-pointer font-bold" |
| 200 | + > |
| 201 | + Question 2 |
| 202 | + </label> |
| 203 | + <div class="grid peer-checked:grid-rows-[1fr] grid-rows-[0fr] transition-all"> |
| 204 | + <div class="overflow-hidden"> |
| 205 | + Lorem ipsum dolor, sit, amet consectetur adipisicing elit. Reprehenderit eum in deleniti dicta ducimus perspiciatis provident tempore. Consequuntur nemo blanditiis delectus, quasi velit illum ipsa quibusdam maiores cupiditate itaque repellendus. |
| 206 | + </div> |
| 207 | + </div> |
| 208 | +</div> |
| 209 | + </div> |
| 210 | + |
| 211 | + <div class="flex flex-col gap-3"> |
| 212 | + <h3 class="font-bold text-md">Radio</h3> |
| 213 | + <div class="flex flex-col group rounded border p-3"> |
| 214 | + <input |
| 215 | + id="radio-question-1" |
| 216 | + name="questions" |
| 217 | + type="radio" |
| 218 | + class="peer hidden" |
| 219 | + /> |
| 220 | + <label |
| 221 | + for="radio-question-1" |
| 222 | + class="flex items-center gap-2 justify-between cursor-pointer font-bold" |
| 223 | + onclick="event.preventDefault(); document.getElementById('radio-question-1').checked = !document.getElementById('radio-question-1').checked;" |
| 224 | + > |
| 225 | + Question 1 |
| 226 | + </label> |
| 227 | + <div class="grid peer-checked:grid-rows-[1fr] grid-rows-[0fr] transition-all"> |
| 228 | + <div class="overflow-hidden"> |
| 229 | + Lorem ipsum dolor, sit, amet consectetur adipisicing elit. Reprehenderit eum in deleniti dicta ducimus perspiciatis provident tempore. Consequuntur nemo blanditiis delectus, quasi velit illum ipsa quibusdam maiores cupiditate itaque repellendus. |
| 230 | + </div> |
| 231 | + </div> |
| 232 | +</div> |
| 233 | + <div class="flex flex-col group rounded border p-3"> |
| 234 | + <input |
| 235 | + id="radio-question-2" |
| 236 | + name="questions" |
| 237 | + type="radio" |
| 238 | + class="peer hidden" |
| 239 | + /> |
| 240 | + <label |
| 241 | + for="radio-question-2" |
| 242 | + class="flex items-center gap-2 justify-between cursor-pointer font-bold" |
| 243 | + onclick="event.preventDefault(); document.getElementById('radio-question-2').checked = !document.getElementById('radio-question-2').checked;" |
| 244 | + > |
| 245 | + Question 2 |
| 246 | + </label> |
| 247 | + <div class="grid peer-checked:grid-rows-[1fr] grid-rows-[0fr] transition-all"> |
| 248 | + <div class="overflow-hidden"> |
| 249 | + Lorem ipsum dolor, sit, amet consectetur adipisicing elit. Reprehenderit eum in deleniti dicta ducimus perspiciatis provident tempore. Consequuntur nemo blanditiis delectus, quasi velit illum ipsa quibusdam maiores cupiditate itaque repellendus. |
| 250 | + </div> |
| 251 | + </div> |
| 252 | +</div> |
| 253 | + </div> |
| 254 | + |
| 255 | + <div class="flex flex-col gap-3"> |
| 256 | + <h3 class="font-bold text-md">Mobile only</h3> |
| 257 | + <div class="flex flex-col group rounded border p-3"> |
| 258 | + <input |
| 259 | + id="mobile-question-1" |
| 260 | + name="" |
| 261 | + type="checkbox" |
| 262 | + class="peer hidden" |
| 263 | + /> |
| 264 | + <label |
| 265 | + for="mobile-question-1" |
| 266 | + class="flex items-center gap-2 justify-between cursor-pointer md:cursor-auto font-bold" |
| 267 | + > |
| 268 | + Question 1 |
| 269 | + </label> |
| 270 | + <div class="grid peer-checked:grid-rows-[1fr] grid-rows-[0fr] transition-all md:grid-rows-[1fr]"> |
| 271 | + <div class="overflow-hidden"> |
| 272 | + Lorem ipsum dolor, sit, amet consectetur adipisicing elit. Reprehenderit eum in deleniti dicta ducimus perspiciatis provident tempore. Consequuntur nemo blanditiis delectus, quasi velit illum ipsa quibusdam maiores cupiditate itaque repellendus. |
| 273 | + </div> |
| 274 | + </div> |
| 275 | +</div> |
| 276 | + <div class="flex flex-col group rounded border p-3"> |
| 277 | + <input |
| 278 | + id="mobile-question-2" |
| 279 | + name="" |
| 280 | + type="checkbox" |
| 281 | + class="peer hidden" |
| 282 | + /> |
| 283 | + <label |
| 284 | + for="mobile-question-2" |
| 285 | + class="flex items-center gap-2 justify-between cursor-pointer md:cursor-auto font-bold" |
| 286 | + > |
| 287 | + Question 2 |
| 288 | + </label> |
| 289 | + <div class="grid peer-checked:grid-rows-[1fr] grid-rows-[0fr] transition-all md:grid-rows-[1fr]"> |
| 290 | + <div class="overflow-hidden"> |
| 291 | + Lorem ipsum dolor, sit, amet consectetur adipisicing elit. Reprehenderit eum in deleniti dicta ducimus perspiciatis provident tempore. Consequuntur nemo blanditiis delectus, quasi velit illum ipsa quibusdam maiores cupiditate itaque repellendus. |
| 292 | + </div> |
| 293 | + </div> |
| 294 | +</div> |
| 295 | + </div> |
| 296 | + |
| 297 | + <div class="flex flex-col gap-3"> |
| 298 | + <h3 class="font-bold text-md">With rotating chevron</h3> |
| 299 | + <div class="flex flex-col group border rounded p-4"> |
| 300 | + <input |
| 301 | + id="rotating-accordion" |
| 302 | + name="" |
| 303 | + type="checkbox" |
| 304 | + class="peer hidden" |
| 305 | + /> |
| 306 | + <label |
| 307 | + for="rotating-accordion" |
| 308 | + class="flex items-center gap-2 justify-between cursor-pointer" |
| 309 | + > |
| 310 | + <span>Click me to toggle</span> |
| 311 | + <svg class="w-5 h-5 group-has-[:checked]:rotate-180 transition-transform" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"> |
| 312 | + <path fill-rule="evenodd" d="M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z" clip-rule="evenodd" /> |
| 313 | + </svg> |
| 314 | + </label> |
| 315 | + <div class="grid peer-checked:grid-rows-[1fr] grid-rows-[0fr] transition-all"> |
| 316 | + <div class="overflow-hidden"> |
| 317 | + <div class="pt-4"> |
| 318 | + This accordion demonstrates the rotating chevron using group-has-[:checked]:rotate-180 class. |
| 319 | + When you click the header, the chevron will rotate 180 degrees. |
| 320 | + </div> |
| 321 | + </div> |
| 322 | + </div> |
| 323 | +</div> |
| 324 | + </div> |
| 325 | + <div class="flex flex-col gap-3"> |
| 326 | + <h3 class="font-bold text-md">Navigation example with background</h3> |
| 327 | + <div class="flex flex-col group border rounded p-4"> |
| 328 | + <input |
| 329 | + id="navigation-accordion" |
| 330 | + name="" |
| 331 | + type="checkbox" |
| 332 | + class="peer hidden" |
| 333 | + /> |
| 334 | + <label |
| 335 | + for="navigation-accordion" |
| 336 | + class="flex items-center gap-2 justify-between cursor-pointer" |
| 337 | + > |
| 338 | + <div class="flex items-center justify-between w-full"> |
| 339 | + <span>Shop Categories</span> |
| 340 | + <svg class="w-5 h-5 group-has-[:checked]:rotate-180 transition-transform" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"> |
| 341 | + <path fill-rule="evenodd" d="M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z" clip-rule="evenodd" /> |
| 342 | + </svg> |
| 343 | + </div> |
| 344 | + </label> |
| 345 | + <div class="grid peer-checked:grid-rows-[1fr] grid-rows-[0fr] transition-all"> |
| 346 | + <div class="overflow-hidden"> |
| 347 | + <ul class="p-5 bg-red-500 text-white rounded-lg mt-2"> |
| 348 | + <li><a href="/what-is-new.html" class="block hover:underline">What's New</a></li> |
| 349 | + <li><a href="/women.html" class="block hover:underline">Women</a></li> |
| 350 | + <li><a href="/men.html" class="block hover:underline">Men</a></li> |
| 351 | + <li><a href="/gear.html" class="block hover:underline">Gear</a></li> |
| 352 | + <li><a href="/training.html" class="block hover:underline">Training</a></li> |
| 353 | + <li><a href="/sale.html" class="block hover:underline">Sale</a></li> |
| 354 | + </ul> |
| 355 | + </div> |
| 356 | + </div> |
| 357 | +</div> |
| 358 | + </div> |
| 359 | + </div> |
165 | 360 | </div> |
166 | 361 | </body> |
167 | 362 | </html> |
0 commit comments