Skip to main content

StyledText

StyledText component renders text with customizable font size, weight, family, color, and alignment, adapting dynamically to screen size and theme.

Example button light mode

Implementation

import { StyledView, StyledText } from '@nexara/nativeflow';

const Component = () => {
return (
<StyledView f={1}>
<StyledText>Here is your text...</StyledText>
</StyledView>
);
};
export default Component;

Props

PropTypeDefaultDescription
variantTypographyVariantDetermines the typography variant and default text color.
fScaleTypographyScale'base'Sets the font size using the theme's responsive typography scale.
ffstringSets the font family.
fsnumberManually overrides the font size.
fwTextStyle['fontWeight']'normal'Sets the font weight.
tasbooleanfalseIf true, centers the text horizontally (textAlign: center).
colorDirectly sets the text color, overriding variant and themeColor.
themeColorbooleanIf true, applies the theme’s primary color.
childrenReact.ReactNodeContent to be rendered inside the text.
styleStyleProp<TextStyle>Additional custom styles to apply to the text.
  • variant (fScale)

VariantDescription
primaryDefault text color for standard content
secondarySecondary text color, usually less prominent
tertiaryTertiary text color, used for hints or info
disabledColor for disabled or inactive text
inverseColor for text over dark backgrounds
  • Font Scale (fScale)

ScaleFont Size (px)
xxs10
xs12
sm14
base16
lg18
xl24
2xl28
3xl32
4xl36
5xl45
6xl57