Expo UI and Router for iOS
Modifiers

contentTransition

Sets the content transition type for a view. Useful for animating changes in text content, especially numeric text. Use with the animation modifier to animate the transition when the content changes.

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 animation 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

This modifier works with any view. These components accept it:

Sources

The original Expo docs for this page:

On this page