Toggle navigation
☰
HTML
CSS
Scripting
Database
<!doctype html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Tailwind CSS Rounded Pagination</title> <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4.2.1"></script> </head> <body class="bg-gray-50 flex justify-center min-h-screen pt-16 p-6 antialiased" x-data="{ current: 2 }"> <div class="flex items-center gap-3 bg-white p-5 rounded-full shadow-4xl border border-white"> <!-- Prev --> <button @click="current = Math.max(1, current - 1)" class="h-10 w-10 rounded-full bg-slate-100 flex items-center justify-center text-slate-400 hover:bg-slate-900 hover:text-white transition-all cursor-pointer disabled:opacity-30 disabled:pointer-events-none" :disabled="current === 1" > <svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M15 19l-7-7 7-7" /></svg> </button> <template x-for="p in [1, 2, 3]"> <button @click="current = p" class="h-10 w-10 rounded-full text-[10px] font-black tracking-widest uppercase transition-all cursor-pointer" :class="current === p ? 'bg-indigo-600 text-white shadow-lg shadow-indigo-100' : 'text-slate-400 hover:text-slate-900 border border-slate-50 hover:bg-slate-50'" x-text="p" ></button> </template> <div class="px-2"> <div class="h-1 w-1 bg-slate-200 rounded-full"></div> </div> <button @click="current = 10" class="h-10 w-10 rounded-full text-[10px] font-black tracking-widest uppercase transition-all cursor-pointer" :class="current === 10 ? 'bg-indigo-600 text-white shadow-lg shadow-indigo-100' : 'text-slate-400 hover:text-slate-900 border border-slate-50 hover:bg-slate-50'" x-text="'10'" ></button> <!-- Next --> <button @click="current = Math.min(10, current + 1)" class="h-10 w-10 rounded-full bg-slate-100 flex items-center justify-center text-slate-400 hover:bg-slate-900 hover:text-white transition-all cursor-pointer disabled:opacity-30 disabled:pointer-events-none" :disabled="current === 10" > <svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M9 5l7 7-7 7" /></svg> </button> </div> <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script> </body> </html>