<Text as={element} size={size} weight={weight} color={color}> Example text snippet </Text>
as
prop to render an alternate HTML element. For example: as="h2"
.Normal | Mid | Heavy |
---|---|---|
Text 12px | Text 12px | Text 12px |
Text 13px | Text 13px | Text 13px |
Text 14px | Text 14px | Text 14px |
Text 16px | Text 16px | Text 16px |
Text 18px | Text 18px | Text 18px |
Text 20px | Text 20px | Text 20px |
Text 26px | Text 26px | Text 26px |
Text 32px | Text 32px | Text 32px |
Text 40px | Text 40px | Text 40px |
Text 48px | Text 48px | Text 48px |
Text 64px | Text 64px | Text 64px |
Text 80px | Text 80px | Text 80px |
Available as a global class at .styledLink
, and a component as StyledLink
. The component verison is build on the Text
component, inheriting and requiring the same props. The class version is automatically added to links in our MDX files.
<StyledLink size={16} href="/styleguide/text" type="styled"> Styled Link Component </StyledLink>
<a className="styledLink" href="/styleguide/text"> Styled Link Class </a>