Style Guide Buku Kasir
Panduan desain visual & dokumentasi untuk aplikasi kasir UMKM di bukukasir.biz.id
Framework: Vue 3 + Tailwind CSS v4 • Mobile-first PWA
Warna
Palet warna utama seluruh platform
theme_color: '#0f766e', background_color: '#f1f5f9'.Tipografi
Font system + skala ukuran per penggunaan
FONT STACK
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
Layout & Container
Mobile-first, container terpusat, safe-area
<div class="relative mx-auto min-h-dvh w-full max-w-lg bg-slate-100 shadow-xl">
- Semua halaman:
max-w-lg(512px), center, mobile-first - Bottom padding:
pb-24(umum),pb-48(halaman Kasir) - Header sticky:
sticky top-0 z-20 bg-slate-100/95 px-4 pt-4 backdrop-blur - Konten:
px-4
.safe-bottom { padding-bottom: env(safe-area-inset-bottom); }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
Komponen
Tombol, card, input, bottom sheet, toast, badge
<button class="h-13 w-full rounded-xl bg-teal-700 py-3.5 font-bold text-white active:bg-teal-800 disabled:opacity-60">
<button class="h-12 rounded-xl border border-slate-300 font-semibold text-slate-700 active:bg-slate-50">
<button class="rounded-xl border border-teal-700 font-bold text-teal-700 active:bg-teal-50">
<button class="h-12 rounded-xl border border-red-200 font-bold text-red-600 active:bg-red-50">
<button class="h-9 shrink-0 rounded-full bg-teal-700 px-4 text-sm font-semibold text-white shadow-sm"><!-- aktif -->
<button class="h-9 shrink-0 rounded-full bg-white px-4 text-sm font-semibold text-slate-600 shadow-sm"><!-- nonaktif -->
<button class="h-10 rounded-lg border border-teal-600/40 bg-teal-50 px-3 text-sm font-semibold text-teal-700 active:bg-teal-100">
<!-- Product Card (grid) -->
<div class="relative select-none rounded-xl bg-white p-3 shadow-sm transition active:scale-[0.98]">
<!-- Info Card -->
<div class="rounded-2xl bg-white p-5 shadow-sm">
<!-- List Card -->
<div class="mx-4 divide-y divide-slate-100 rounded-2xl bg-white shadow-sm">
<!-- Summary Card -->
<div class="rounded-xl bg-slate-50 p-4 text-sm">
<!-- Payment Total -->
<div class="rounded-xl bg-teal-50 p-4 text-center">
<input class="w-full rounded-xl border border-slate-300 bg-white px-4 py-3 outline-none focus:border-teal-600 focus:ring-2 focus:ring-teal-600/20" />
<input type="checkbox" class="h-6 w-6 accent-teal-700" />
<label class="block text-sm font-medium text-slate-700 mb-1.5">
<!-- Backdrop -->
<div class="fixed inset-0 z-40 bg-black/40" />
<!-- Sheet -->
<div class="fixed inset-x-0 bottom-0 z-50 flex justify-center">
<div class="w-full max-w-lg rounded-t-2xl bg-white shadow-2xl">
<div class="mx-auto mt-2 h-1.5 w-10 rounded-full bg-slate-200" />
<div class="max-h-[80dvh] overflow-y-auto px-5 pb-6 pt-3 safe-bottom">
Void : rounded bg-red-50 px-1.5 py-0.5 text-[10px] font-bold text-red-600
Nonaktif : rounded bg-slate-100 px-1.5 py-0.5 text-[10px] font-bold text-slate-500
Stok ∞ : rounded bg-teal-50 px-1.5 py-0.5 text-[10px] font-bold text-teal-600
Offline : rounded-full bg-amber-100 px-2.5 py-0.5 text-xs font-semibold text-amber-700
grid grid-cols-2 gap-1 rounded-xl bg-slate-200/70 p-1; aktif bg-white text-slate-900 shadow-sm.<nav class="fixed inset-x-0 bottom-0 z-30 mx-auto w-full max-w-lg border-t border-slate-200 bg-white safe-bottom">
<header class="sticky top-0 z-20 border-b border-slate-200 bg-white">
<div class="flex h-14 items-center gap-2 px-4">
<!-- back: rounded-full text-slate-600 active:bg-slate-100 -->
<!-- title: text-lg font-bold text-slate-900 -->
Shadow
Bayangan konsisten untuk card, button, toast
Border Radius
Skala radius seluruh komponen
rounded-full → pill (category, search, back, load-more)
rounded-2xl → card, bottom sheet, list container
rounded-xl → button, input, product card, receipt
rounded-lg → increment/decrement, quick amount, tab aktif
rounded-md → badge tipe pergerakan stok
Icon
Inline SVG gaya Heroicons (stroke-based)
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path stroke-linecap="round" stroke-linejoin="round" d="..." />
</svg>
| Elemen | Stroke Width |
|---|---|
| Icon umum | 1.5 atau 2 |
| Icon navigasi | 1.8 |
| Icon FAB plus | 2.5 |
Transisi
Animasi bottom sheet, fade, dan kartu
/* Bottom Sheet */
.sheet-enter-active, .sheet-leave-active { transition: transform 0.25s ease; }
.sheet-enter-from, .sheet-leave-to { transform: translateY(100%); }
/* Fade */
.fade-enter-active, .fade-leave-active { transition: opacity 0.2s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }
/* Product Card Press */
active:scale-[0.98]
/* Spinner */
animate-spin
Tokens & Grid Pattern
Pola layout & aturan untuk fitur baru
| Pattern | Kelas Tailwind |
|---|---|
| Grid produk | grid grid-cols-2 gap-3 |
| Grid pembayaran | grid grid-cols-3 gap-2 |
| Grid statistik | grid grid-cols-3 divide-x divide-slate-100 |
| Grid form 2 kolom | grid grid-cols-2 gap-3 |
| Scroll kategori | no-scrollbar flex gap-2 overflow-x-auto |
| List dengan divider | divide-y divide-slate-100 |
| List item | flex items-center gap-3 px-4 py-3.5 active:bg-slate-50 |
h-12, input min font 16px (cegah iOS zoom). Currency id-ID: Rp 1.000.Dokumentasi Markdown (AI-readable)
Dokumen yang bisa dibaca AI tanpa crawl
Dokumen AI-readable berisi seluruh aturan styleguide dalam satu file markdown, sehingga AI/agent (opencode, Claude, dsb.) dapat memahami sistem desain tanpa menjelajahi website.
https://styleguide.bukukasir.biz.id/styleguide.md
Penerapan
Platform yang memakai sistem desain ini
| Platform | Stack | URL |
|---|---|---|
| Buku Kasir (main app) | Vue 3 + Tailwind v4, mobile-first PWA | bukukasir.biz.id (production) |
| Buku Kasir (staging) | sama, environment terpisah | pos.batuteknologi.web.id |
| POS Superadmin | Tailwind v4 via CDN + Alpine.js | superadmin-pos.batuteknologi.web.id |
| Landing Page | landingpage.html (independen) | bagian dari bukukasir.biz.id |