Skip to content

Responsive Design

Live Preview -- Three Breakpoints

Mobile <640px
Beranda
PENDAPATAN
12.4jt
TRANSAKSI
142
Home
Stok
Tugas
Lagi
Tablet 640--1024px
Dashboard
PENDAPATAN
12.4jt
TRANSAKSI
142
Desktop >1024px
RetailOS
Penjualan
Dashboard
Transaksi
Retur
Operasional
Stok
Dashboard
PENDAPATAN
12.4jt
TRANSAKSI
142
REFUND
3
MARGIN
24%

Bumi targets three breakpoints. The layout adapts between them with platform-appropriate navigation, grid systems, and spacing.

Breakpoints

NameRangePrimary Context
Mobile< 640pxPhone browsers, React Native apps
Tablet640px -- 1024pxTablets, small laptops
Desktop> 1024pxDesktop browsers, large screens
css
/* Mobile first approach */
@media (min-width: 640px)  { /* tablet */ }
@media (min-width: 1024px) { /* desktop */ }

Layout by Breakpoint

Desktop (> 1024px)

PropertyValue
NavigationFixed sidebar, 240px
Content gridUp to 4 columns
Page padding40px
Floating shell margin12px
CardsSide-by-side in grid

Tablet (640px -- 1024px)

PropertyValue
NavigationCollapsible sidebar (hamburger toggle)
Content grid2 columns
Page padding24px
Floating shell margin8px
Cards2-column grid

Mobile (< 640px)

PropertyValue
NavigationBottom tab bar (no sidebar)
Content gridSingle column, full width
Page padding20px
Floating shell margin0px (full bleed)
CardsFull-width stack

Floating Shell Adaptation

css
.app-shell {
  margin: 12px;
  border-radius: 14px;
  height: calc(100vh - 24px);
}

@media (max-width: 1024px) {
  .app-shell {
    margin: 8px;
    border-radius: 12px;
    height: calc(100vh - 16px);
  }
}

@media (max-width: 640px) {
  .app-shell {
    margin: 0;
    border-radius: 0;
    height: 100vh;
    box-shadow: none;
  }
}

Grid System

Use CSS Grid or Flexbox with gap utilities. Column counts adapt by breakpoint.

tsx
{/* Dashboard stats grid */}
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
  <StatCard />
  <StatCard />
  <StatCard />
  <StatCard />
</div>

{/* Content + sidebar layout */}
<div className="grid grid-cols-1 lg:grid-cols-[1fr_320px] gap-6">
  <MainContent />
  <SidePanel />
</div>
PlatformPrimary NavSecondary Nav
Desktop WebSidebar (always visible)Page-level tabs
Tablet WebCollapsible sidebarPage-level tabs
Mobile WebBottom tabsStack navigation (back button)
React Native (iOS/Android)Bottom tabsStack navigation
POS (Electron)Sidebar (fixed, never collapses)Action bar

Mobile Safe Areas

React Native apps must respect device safe areas (notch, home indicator, status bar).

tsx
import { SafeAreaView } from 'react-native-safe-area-context';

export function Screen({ children }: { children: React.ReactNode }) {
  return (
    <SafeAreaView style={{ flex: 1, backgroundColor: '#FAFAF7' }} edges={['top']}>
      {children}
    </SafeAreaView>
  );
}
Safe AreaiOS ValueNotes
Status bar (top)44px--59pxDynamic Island devices have taller area
Home indicator (bottom)34pxOnly on Face ID devices
Tab bar total height84px50px content + 34px safe area

Typography Scaling

Font sizes remain fixed (no responsive scaling). The type scale is designed to work at all breakpoints.

Why no responsive type?

Bumi's type scale (10px--32px) is calibrated for dense data applications. Scaling fonts up on desktop wastes space; scaling them down on mobile hurts readability. Keep sizes consistent and let the layout handle density.

Tables on Mobile

Data tables are common in RetailOS. On mobile, they adapt:

  1. Horizontal scroll --- wrap the table in an overflow-x-auto container
  2. Card transformation --- convert table rows to stacked cards for simple lists
  3. Priority columns --- hide low-priority columns on mobile, show them on desktop
tsx
{/* Scrollable table */}
<div className="overflow-x-auto -mx-5 px-5">
  <table className="min-w-[600px] w-full">
    {/* ... */}
  </table>
</div>

DO and DON'T

DO

  • Design mobile-first, then add complexity for larger screens
  • Use the bottom tab bar for mobile navigation, sidebar for desktop
  • Test all pages at 375px width (iPhone SE) as the minimum target
  • Use safe-area-inset-* CSS env vars for web mobile layouts

DON'T

  • Don't hide essential functionality behind desktop-only layouts
  • Don't use responsive font scaling --- keep the type scale fixed
  • Don't show the sidebar on mobile --- use bottom tabs instead
  • Don't assume mouse hover on mobile --- all interactive states must work with touch

RetailOS - Sistem ERP Retail Modern untuk Indonesia