Skip to main content

Summary

The application utilizes a customized Material 3 implementation that emphasizes fluid motion and smart layout adaptation. Key features include a centralized snackbar system that dodges floating action buttons, a card system with dynamic corner shaping based on list position, and a suite of playful, physics-based animations for loaders and buttons.

Theme

Colors

The UI relies heavily on the Material 3 semantic color roles.

Surface Tones

  • Surface: Main background.
  • Surface Container: Used for card backgrounds in light mode.
  • Surface Container High: Used for card backgrounds in dark mode.

Feedback

  • Primary: Active elements and brand highlights.
  • Error Container: Used for “Uninstalled” app states (red background).
  • On Error Container: Text color for error states.

Spacing Tokens

The system uses a LocalSpacing composition local to ensure consistent gaps.
TokenValueUsed For
xs4dpTight grouping (text to icon)
s8dpStandard element separation
m16dpCard padding, standard margins
l24dpSection separation

Components

ScreenScaffold

What it is: The foundational wrapper for every screen in the app. Key Feature: It automatically handles the top app bar and scrolling behavior. Uniquely, the “Back” button in the top bar renders with a randomized expressive shape (flower, clover, diamond, etc.) every time the screen loads, adding a playful touch. Variants:
AppBar TypeDescription
LargeCollapsing header, used for main landing screens.
SmallFixed header, used for detail screens.
HiddenNo header, full-screen content.

AppSnackbarHost

What it is: A smart notification container that positions itself dynamically to avoid overlapping UI elements. Behavior:
  1. FAB Awareness: If a Floating Action Button is visible, the snackbar floats above it.
  2. Nav Bar Awareness: If the bottom navigation is visible, the snackbar floats above it.
  3. Fallback: If neither is present, it sits at the bottom with safe padding.
Style: Renders as a “pill” shape with a high-elevation shadow. It includes special logic to show a trash icon if the message contains the word “uninstalled”.

Dashboard Cards

What it is: A versatile card system for displaying statistics and app lists. Dynamic Shaping: These cards use a GroupPosition logic. If cards are stacked, the top card has rounded top corners, the middle card has sharp corners, and the bottom card has rounded bottom corners. Variants:
ComponentUsage
DashboardCardLarge display for primary stats (e.g., Screen Time) with comparison text.
CompactStatCardSmaller square card for secondary metrics (e.g., Unlocks).
AppListItemCardRows representing apps. Changes color to red if the app is uninstalled.
AppUsageCardA complex card showing a list of top apps with progress bars.

AppLoader

What it is: A centralized loading indicator supporting multiple visual styles. Variants:
TypeVisual
DotA 7x7 grid of dots playing frame-by-frame animations (DNA, Pong, Breathing).
StandardA standard circular spinner.
WavyA wavy circular progress indicator.

SpringFab

What it is: A Floating Action Button that uses spring physics for interaction. Behavior: When pressed, the button scales down slightly and (for the extended version) rotates subtly using a bouncy spring animation, providing tactile feedback.

Component Library

ComponentUsage
ScreenScaffoldMain screen wrapper with AppBar.
SectionHeaderText header for grouping content.
PredictiveBackVisual indicator for back gestures.

Screen Structure

The app follows a strict hierarchy where the SnackbarHost lives at the root, while individual screens use the ScreenScaffold.

State Handling

StateVisual Representation
Loading (Initial)AppLoader (Dot matrix or Spinner) takes over the center screen.
Loading (Partial)ShimmerBlock overlays specific text or image areas while keeping layout stable.
UninstalledApp cards turn semi-transparent red (errorContainer) with a trash icon.
ComparisonStats show green/red arrows indicating increase or decrease vs. yesterday.

Animations

The UI system prioritizes physics-based motion over linear transitions.
  1. Spring Physics: Used on FABs and Snackbars. Elements bounce slightly when pressed or when moving into position.
  2. Dot Matrix: The DotLoader uses frame-by-frame integer arrays to create retro-style pixel animations (e.g., a ball bouncing, DNA spiraling).
  3. Shimmer: A gradient wipe effect used on placeholder modifiers to indicate data fetching.
  4. Predictive Back: An arrow icon that scales and morphs based on the user’s swipe progress.

Rules

  1. Centralize Feedback: Do not create local SnackbarHosts inside screens. Use the global host via composition locals.
  2. Group Your Cards: When stacking cards, use the GroupPosition parameter (Top, Middle, Bottom) to merge their corners visually.
  3. Use Loaders Consistently: Prefer AppLoader over raw circular indicators to maintain the app’s branding.
  4. Debounce Loading: Use rememberLoaderVisibility to prevent loading spinners from flashing briefly for fast operations.
Last modified on January 25, 2026