agentsclimarketplace

Mobile ui patterns

Skill almasumdev/awesome-mobile-agent-skills/.github/skills/fundamentals/mobile-ui-patterns

Canonical mobile UI patterns (list, detail, tab, sheet, master-detail, search, form) with platform-aware guidance across SwiftUI, Compose, Flutter, and React Native. Use when designing or reviewing screens.From its SKILL.md

Install
npx -y skills add almasumdev/awesome-mobile-agent-skills --skill mobile-ui-patterns

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

6.2 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it

Mobile UI Patterns

Instructions

Mobile apps are built from a small set of recurring UI patterns. Using canonical patterns reduces design debt, makes navigation predictable, and keeps the codebase learnable. This skill names the patterns and shows the cross-platform equivalents.

1. The Core Pattern Set

PatternWhen to usePlatform convention cue
ListBrowsing a homogeneous collectionPlain list, grouped list (iOS), LazyColumn (Android)
DetailFocused view of a single itemPushed onto the stack from a list
Tabs2-5 peer destinations always availableBottom tab bar (both platforms)
SheetSecondary task or disclosureModal/half sheet (iOS 15+), BottomSheet (Android)
Master-detailLarge screens: list on left, detail on rightiPad, foldable, tablet layouts
SearchFiltering or discoverysearchable (SwiftUI), SearchBar (Compose)
FormStructured data entryGrouped list style; keyboard-aware
FeedVertical infinite contentPull-to-refresh + pagination
OnboardingFirst-run explanationHorizontal paged, skippable
Empty / error / loadingNon-happy path of any screenTri-state render contract

2. The Tri-State Screen Contract

Every data-driven screen must handle loading, empty, and error as first-class states alongside content. Agents should reject "success-only" designs.

// SwiftUI
switch viewModel.state {
case .loading: ProgressView()
case .empty:   EmptyStateView(onAction: viewModel.createNew)
case .error(let e): ErrorStateView(message: e.localizedDescription, retry: viewModel.load)
case .content(let items): List(items) { ItemRow(item: $0) }
}
// Jetpack Compose
when (val s = state) {
    UiState.Loading -> CircularProgressIndicator()
    UiState.Empty   -> EmptyState(onAction = vm::createNew)
    is UiState.Error -> ErrorState(s.message, retry = vm::load)
    is UiState.Content -> LazyColumn { items(s.items) { ItemRow(it) } }
}
// Flutter
return switch (state) {
  Loading()            => const Center(child: CircularProgressIndicator()),
  Empty()              => EmptyState(onAction: vm.createNew),
  Error(:final message)=> ErrorState(message: message, retry: vm.load),
  Content(:final items)=> ListView(children: items.map(ItemRow.new).toList()),
};
// React Native
if (state.kind === 'loading') return <ActivityIndicator />;
if (state.kind === 'empty')   return <EmptyState onAction={vm.createNew} />;
if (state.kind === 'error')   return <ErrorState message={state.message} retry={vm.load} />;
return <FlatList data={state.items} renderItem={({item}) => <ItemRow item={item} />} />;

3. List Pattern Details

  • Use lazy containers: List, LazyColumn, ListView.builder, FlatList. Never map over an array of 1000 items into a non-virtualized container.
  • Row height should be stable. If not, supply a key/id to aid diffing.
  • Pull-to-refresh is expected on any user-owned list.
  • Pagination is either cursor-based (preferred) or page-index-based, never both.
  • Separator style follows platform: iOS inset separators, Android divider or none with spacing.

4. Detail Pattern Details

  • Hero item is above the fold on phones.
  • Primary action is a single, visually dominant button.
  • Destructive actions go under an overflow menu or a confirmation sheet, never a primary button.
  • On iOS, large navigation title collapses on scroll; on Android, use collapsing top app bar sparingly.

5. Tabs Pattern Details

  • 2-5 tabs. Six is a code smell; replace with "More".
  • Each tab owns its own navigation stack. Deep links restore into the right tab.
  • Tab icons use filled/outlined variants for selected/unselected on both platforms.
  • Do not hide tabs on scroll unless the screen is immersive (video, map).

6. Sheet Pattern Details

  • Use sheets for tasks that could return the user to the previous context (composing, filtering).
  • iOS 15+ supports presentationDetents([.medium, .large]); Android uses ModalBottomSheet.
  • Avoid stacking sheets more than two deep.
  • Sheets are dismissable with a swipe on both platforms; always persist draft state on dismiss.

7. Master-Detail Pattern Details

  • Trigger breakpoint at 600-700 dp width (roughly iPad portrait, large foldable unfolded).
  • On phones, this collapses to list -> detail push navigation.
  • Preserve selection across orientation changes.
  • Detail pane must function standalone (bookmarks, deep links land there directly).

8. Search Pattern Details

  • Debounce input by 250-400 ms before querying.
  • Cancel the previous request when a new one starts.
  • Empty state shows recent searches or a helpful prompt.
  • Respect the platform: search bar at top on Android (Material), inside navigation on iOS.

9. Form Pattern Details

  • Keyboard type matches the field (.emailAddress, .numberPad, KeyboardType.Password, inputType, keyboardType="email-address").
  • Focus advances on return; submit on the final field.
  • Validate on blur, not on every keystroke.
  • Show a single inline error per field, not a top-of-form summary alone.
  • Forms must survive backgrounding and rotation without data loss.

10. Platform Convention Respect

Do not build a Material-styled app on iOS or vice versa. Conventions cost little at build time and dominate perceived quality. When using Flutter or React Native, use adaptive components (CupertinoSwitch / Switch, Platform.select) for controls that have strong platform semantics.

Checklist

  • Every screen handles loading, empty, error, and content states explicitly.
  • Lists use platform-appropriate lazy containers and keyed items.
  • Tab count is 2-5; each tab has its own stack and deep-link entry.
  • Sheets are used for sub-tasks, not primary navigation.
  • Master-detail triggers on tablet-width; selection survives rotation.
  • Search is debounced, cancellable, and has recent/empty states.
  • Forms handle keyboard types, focus order, validation timing, and rotation.
  • Platform controls are adaptive in cross-platform stacks.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,614. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.