Design System Integration
Prinsip
- Consistency — Komponen UI harus terlihat dan berperilaku sama di semua screen.
- Reusability — Buat komponen yang dapat digunakan ulang.
- Theming — Semua warna, typography, dan spacing harus merujuk ke design token.
- No Hardcoded Values — Jangan gunakan warna hex atau font size langsung di komponen.
Design Tokens
Setiap project harus mendefinisikan design tokens untuk:
| Token | Contoh |
|---|---|
| Colors | primary, secondary, surface, error, onPrimary |
| Typography | headlineLarge, bodyMedium, labelSmall |
| Spacing | xs: 4, sm: 8, md: 16, lg: 24, xl: 32 |
| Border Radius | sm: 4, md: 8, lg: 16, full: 999 |
| Shadow / Elevation | none, sm, md, lg |
Component Library
Setiap project harus memiliki shared component library minimal:
Button(primary, secondary, outlined, text) — atomInput— atomAvatar— atomBadge— atomLoadingIndicator— atomModal/BottomSheet(container) — atomTextField— moleculeCard— moleculeDialog/Alert— moleculeEmptyState— moleculeErrorState— moleculeSnackBar/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.