🌐 A component for displaying text. Adapts to the platform color scheme (light/dark) by default and exposes a focused subset of typography knobs through textStyle.
🌐 Use numberOfLines to clamp long text with a trailing ellipsis.
TruncatedTextExample.tsx
import{ useColorScheme }from'react-native';import{Host,Text}from'@expo/ui';exportdefaultfunctionTruncatedTextExample(){const colorScheme =useColorScheme();return(<HostmatchContents={{ vertical:true}}style={{ width:'100%'}}><TextnumberOfLines={1}textStyle={{ color: colorScheme ==='dark'?'#FFFFFF':'#000000'}}>
A very long line of text that will be truncated when it does not fit on a single line.
</Text></Host>);}