norph

Text that morphs into its next value. Shared letters slide, new ones fade in, and digits roll by place value. One Reanimated component for iOS, Android, and web.

Press a chip again to step it. Count and Price also take −, +, and Shuffle. Or type in the field.

Install

In an Expo app, expo install picks the Reanimated version that matches your SDK:

npx expo install @glpecile/norph react-native-reanimated react-native-worklets

Outside Expo, add the same three packages with your package manager. norph ships TypeScript source for Metro, so it needs no native build of its own.

Use

import { MorphText } from '@glpecile/norph';

<MorphText style={{ fontSize: 24, alignSelf: 'flex-start' }}>
  {count}
</MorphText>
children
The text, a string or a number. A change morphs in place.
style
Text styles reach every glyph. Margins and alignment reach the outer box.
className
The same split, for apps that resolve classes on core components, such as Uniwind.
numberOfLines
Turns the morph off and renders plain text.

Behavior

One line: the text never wraps. Text too long for its box ends in an ellipsis.