Skip to main content
The element inspector is a visual debugging tool that lets you tap any UI element in your app to inspect its properties, styles, and component hierarchy.

Accessing the Inspector

From the Dev Menu

1

Open dev menu

  • iOS: Shake device or press Cmd+D in simulator
  • Android: Shake device or press Cmd+M / Ctrl+M in emulator
2

Select 'Show Element Inspector'

The inspector overlay appears on your app.

Programmatically

Using the Inspector

Inspecting Elements

1

Tap any element

Tap any visible UI element in your app.
2

View details

An overlay appears showing:
  • Component name
  • Element dimensions
  • Position (x, y)
  • Style properties
  • Component hierarchy
3

Navigate hierarchy

Tap breadcrumbs at the top to navigate up the component tree.

Inspector Overlay

The inspector shows:

Debugging Layouts

Layout Boundaries

The inspector highlights element boundaries with colored borders:
app/components/Card.tsx

Flexbox Debugging

Inspect flex layout properties:
app/components/Row.tsx

Measuring Dimensions

Style Inspection

Computed Styles

The inspector shows final computed values:

Style Priority

See which styles are applied when multiple sources exist:

Platform-Specific Styles

Component Hierarchy

The breadcrumb trail shows the component tree:

Finding Components

Advanced Inspection

Custom Inspector Integration

Extend inspector functionality:
app/components/Inspectable.tsx

Performance Monitoring

Combine with performance monitor:

Snapshot Testing

Capture inspector state for testing:

E2E Testing Integration

The inspector’s element detection is similar to E2E test selectors.

With Maestro

e2e/inspector-test.yaml

With Detox

e2e/inspector.test.ts

Troubleshooting

Inspector Not Showing

Can’t Tap Elements

Ensure elements are tappable:

Missing Style Information

Some styles may not appear:

Inspector Blocks Interaction

Disable inspector when done:

Best Practices

1. Use testID for Identification

2. Meaningful Component Names

3. Avoid Deeply Nested Styles

4. Document Complex Layouts

Next Steps

DevTools

Explore Expo DevTools features

Debugging

Learn debugging techniques

E2E Testing

Set up end-to-end tests

Performance

Monitor performance