Expo UI and Router for iOSExpo SDK 57 and later, iOS only
Modifiers

contentTransition

Sets the content transition type for a view.

contentTransition(transitionType, params)

iOS 16+
ParameterTypeDescription
transitionType'opacity' | 'identity' | 'numericText' | 'interpolate'The type of content transition.
params(optional){ countsDown: boolean }Optional parameters.

Sets the content transition type for a view.

  • Useful for animating changes in text content, especially numeric text.
  • Use with the 0 modifier to animate the transition when the content changes.

Returns: ModifierConfig

See: Official SwiftUI documentation.

Example

<Text modifiers={[contentTransition('numericText'), animation(Animation.default, count)]}>
  {count.toString()}
</Text>

Works with

You can add contentTransition to any view. It changes what you see on 35 of the 39 components.

No visible effect

These components accept it, but you see no change.

ComponentWhy nothing happens
SpacerIt changes how text and SF Symbols animate when their content changes, and Spacer shows neither.
DividerIt changes how text and SF Symbols animate when their content changes, and Divider shows neither.
SliderIt changes how text and SF Symbols animate when their content changes, and Slider shows neither.
AccessoryWidgetBackgroundIt changes how text and SF Symbols animate when their content changes, and AccessoryWidgetBackground shows neither.

Sources

The original Expo docs for this page:

On this page