Skip to main content

StyledText

StyledText renders a customizable Text component with responsive styling based on variants and props.

Implementation

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

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

Props

PropTypeDefaultDescription
variant'h1'| 'h2' ... 'h7''h5'Controls the font size using theme-based variant sizes.
ffstringSets the font family.
fsnumberManually overrides the font size.
tasbooleanfalseIf true, centers the text horizontally (textAlign: center).
fwstring'normal'Sets the font weight.
colorstringSets the text color directly.
themeColorbooleanIf true, applies the theme's primary color.
primarybooleanIf true, uses theme’s textPrimary color.
secondarybooleanIf true, uses theme’s textSecondary color.
styleTextStyleAdditional styles to apply to the text.
  • Font Size by Variant

VariantFont Size
h132
h224
h318
h416
h514
h612
h710