Skip to main content
rule CX Codex

ui-expo-image — Claude Code rule: what it does, how to install

ui-expo-image is a Claude Code rule that swaps React Native's default Image for expo-image. It guides code generation toward blurhash placeholders, disk caching, and list recycling.

AGPL-3.0 ★ 88 updated 2026-11-17

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/ui-expo-image.md
Open on GitHub

What ui-expo-image does

This rule instructs the assistant to import Image from expo-image rather than react-native. The change prevents memory spikes inside scrollable feeds and introduces smooth fade-in animations via transition.

Code samples define specific rendering attributes: blurhash strings in placeholder, scaling via contentFit, loading order through priority, and storage targets in cachePolicy. It also specifies recyclingKey to keep list scrolling performant.

For shared web and mobile setups, the guideline mandates SolitoImage from solito/image.

What it helps with

  • replace React Native Image with expo-image
  • configure memory and disk caching via cachePolicy
  • add blurhash placeholders during image fetch
  • maintain list recycling performance using recyclingKey
  • implement cross-platform SolitoImage for web and native builds

Example prompts for the agent

  • Build an avatar component with a smooth fade-in transition
  • Create a hero image with a blurhash placeholder and memory-disk caching
  • Implement a cross-platform image using SolitoImage

How to install ui-expo-image

Manually: put the files in place

.claude/rules/ui-expo-image.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about ui-expo-image

How to install ui-expo-image in Claude Code?

Add the rule file at .claude/rules/ui-expo-image.md in your repository root.

What does ui-expo-image do?

It directs the AI to use expo-image instead of standard React Native Image, configuring caching, fetch priority, and blurhash placeholders.

What should be used for cross-platform web and native support?

The rule instructs to use SolitoImage from solito/image, which wraps expo-image for shared codebases.

Similar IDE rules

All IDE rules for Mobile →

From the same set47

The whole set →
imports-design-system-folder imports-design-system-folder is a Claude Code rule that forbids importing UI packages directly into application code. All components must pass through a local design system directory. CX Codex +1 ★ 88repo stars ui-pressable ui-pressable is a Claude Code rule for choosing touch components in React Native. It applies when an agent adds or edits buttons and list items. CX Codex +1 ★ 88repo stars ui-safe-area-scroll ui-safe-area-scroll is a Claude Code rule that enforces native iOS safe area handling in React Native ScrollViews. It stops layout jumping during keyboard transitions. CX Codex +1 ★ 88repo stars design-system-compound-components design-system-compound-components is a Claude Code rule that forbids raw string children in non-text components. It enforces compound structures like ButtonText and ButtonIcon across the design system. CX Codex +1 ★ 88repo stars js-hoist-intl js-hoist-intl is a Claude Code rule that moves Intl formatter creation out of renders and loops. It applies to JavaScript code that formats dates, numbers, or relative time. CX Codex +1 ★ 88repo stars react-state-fallback react-state-fallback is a Claude Code rule that enforces reactive fallbacks instead of copying props into component state. It prevents stale UI bugs during parent updates. CX Codex +1 ★ 88repo stars list-performance-virtualize list-performance-virtualize is a Claude Code rule that recommends virtualized lists for scrollable content. It applies while building list-based screens. CX Codex +1 ★ 88repo stars react-state-minimize react-state-minimize is a Claude Code rule that enforces minimal React state. It directs assistants to compute values on render rather than storing redundant state variables. CX Codex +1 ★ 88repo stars

Project sponsors

Companies that keep this analytics open