Lewati ke konten utama

Design System Integration

Prinsip​

  1. Consistency — Komponen UI harus terlihat dan berperilaku sama di semua screen.
  2. Reusability — Buat komponen yang dapat digunakan ulang.
  3. Theming — Semua warna, typography, dan spacing harus merujuk ke design token.
  4. No Hardcoded Values — Jangan gunakan warna hex atau font size langsung di komponen.

Design Tokens​

Setiap project harus mendefinisikan design tokens untuk:

TokenContoh
Colorsprimary, secondary, surface, error, onPrimary
TypographyheadlineLarge, bodyMedium, labelSmall
Spacingxs: 4, sm: 8, md: 16, lg: 24, xl: 32
Border Radiussm: 4, md: 8, lg: 16, full: 999
Shadow / Elevationnone, sm, md, lg

Component Library​

Setiap project harus memiliki shared component library minimal:

  • Button (primary, secondary, outlined, text) — atom
  • Input — atom
  • Avatar — atom
  • Badge — atom
  • LoadingIndicator — atom
  • Modal / BottomSheet (container) — atom
  • TextField — molecule
  • Card — molecule
  • Dialog / Alert — molecule
  • EmptyState — molecule
  • ErrorState — molecule
  • SnackBar / Toast — molecule
Struktur Komponen

Komponen disusun mengikuti pola Atomic Design (atom → molecule → organism). Lihat Atomic Design untuk aturan level, dependency, dan letak folder di setiap platform.

Figma Integration

Pastikan design tokens di code sinkron dengan Figma design system. Gunakan tools seperti Figma Tokens atau Style Dictionary jika diperlukan.