This's my code:
<Text color={"black.400"} fontWeight={"bold"} fontSize={"16px"}>
{totalArea} m2
</Text>
I want to make text appear that the number 2 in the top right of letter 'm'. What's it name?
CodePudding user response:
The <sup> tag defines superscript text. Superscript text appears half a character above the normal line, and is sometimes rendered in a smaller font.
So, you can do
<Text color={"black.400"} fontWeight={"bold"} fontSize={"16px"}>
{totalArea} m<sup>2</sup>
</Text>
