A modern, iOS-native calculator app that extends beyond basic arithmetic with scientific functions, unit conversions, and history tracking. The design follows Apple Human Interface Guidelines with a focus on one-handed portrait usage and intuitive gesture-based interactions.
Primary Content:
- Large display area showing current input/result
- Secondary display for previous operation/history
- Grid-based button layout for numbers and operations
- Mode switcher (Basic / Scientific / Converter)
Functionality:
- Basic arithmetic operations (+, -, ×, ÷)
- Scientific functions (sin, cos, tan, log, ln, √, x², x³, xʸ, π, e)
- Memory functions (MC, MR, M+, M-)
- Percentage calculations
- Parentheses support for complex expressions
- Backspace/clear operations
- Real-time calculation with expression evaluation
Primary Content:
- Category selector (Length, Weight, Temperature, Volume, Area, Speed, Time, Energy)
- From unit input field with unit selector
- To unit input field with unit selector
- Conversion result display
- Quick swap button between units
Functionality:
- Real-time conversion as user types
- Support for multiple unit categories
- Swap from/to units with one tap
- Recent conversions list
Primary Content:
- Chronological list of past calculations
- Each entry shows expression and result
- Search/filter functionality
- Clear history option
Functionality:
- Tap to copy result
- Long press to reuse calculation
- Swipe to delete individual entries
- Date grouping (Today, Yesterday, Older)
Primary Content:
- Decimal precision selector
- Angle mode (Degrees/Radians)
- Theme selection (System/Light/Dark)
- Haptic feedback toggle
- Sound effects toggle
- About section
Functionality:
- Persist user preferences
- Apply settings across all calculator modes
- App version and credits
Brand Colors:
- Primary: Deep Blue (#1E40AF) - for primary action buttons and highlights
- Accent: Bright Cyan (#06B6D4) - for operation buttons and active states
- Background Light: Pure White (#FFFFFF)
- Background Dark: Rich Black (#0F172A)
- Surface Light: Light Gray (#F1F5F9)
- Surface Dark: Dark Slate (#1E293B)
- Number Buttons: Soft Gray (#E2E8F0) in light, Dark Gray (#334155) in dark
- Operation Buttons: Cyan gradient (#06B6D4 to #0891B2)
- Equals Button: Bold Blue (#1E40AF)
- Text Primary: Near Black (#0F172A) in light, White (#F8FAFC) in dark
- Text Secondary: Medium Gray (#64748B)
- User opens app → Calculator screen (Basic mode) displayed
- User taps number buttons → Numbers appear in display
- User taps operation (+, -, ×, ÷) → Operation registered
- User taps more numbers → Second operand entered
- User taps equals (=) → Result displayed, calculation saved to history
- User taps mode switcher → Selects "Scientific"
- Button grid expands to show scientific functions
- User enters expression using numbers, operations, and functions (e.g., sin(45) + √16)
- User taps equals → Result calculated and displayed
- Calculation auto-saved to history
- User navigates to Converter tab
- User selects category (e.g., "Length")
- User taps "From" field → Selects unit (e.g., "Kilometers")
- User enters value → Real-time conversion displayed in "To" field
- User can tap swap icon to reverse conversion direction
- Conversion saved to recent conversions
- User navigates to History tab
- Scrollable list of past calculations displayed
- User taps on an entry → Result copied to clipboard (toast notification)
- User long-presses entry → Calculator opens with that expression pre-loaded
- User swipes left on entry → Delete option appears
- User navigates to Settings tab
- User taps "Decimal Precision" → Picker shows options (2, 4, 6, 8, 10 decimals)
- User selects preference → Setting saved and applied immediately
- User toggles "Haptic Feedback" → Preference saved
- Settings persist across app sessions
Calculator Screen Layout:
- Display area: Top 30% of screen (safe area aware)
- Button grid: Bottom 70% with adequate touch targets (min 56px)
- Buttons arranged in 4-5 columns depending on mode
- Equal button spans 2 columns for emphasis
- One-handed thumb reach optimized
Navigation:
- Tab bar at bottom with 4 tabs: Calculator, Converter, History, Settings
- Icons: calculator.fill, arrow.left.arrow.right, clock.fill, gearshape.fill
Interaction Patterns:
- Button press: Scale animation (0.95) + haptic feedback
- Long press on display: Copy result
- Swipe left on display: Backspace
- Swipe right on display: Clear
- Pull down on history: Refresh
- Use
math.jsor similar library for expression evaluation - Store history in AsyncStorage (local only, no backend needed)
- Support landscape orientation for extended scientific mode
- Implement keyboard input support for web version
- Use react-native-reanimated for smooth animations
- Implement proper error handling for invalid expressions