Skip to main content

Component <P1 /> - <P4 />

Props

PropsTypeMeaningPossible values
weightstringChange texts font weightlight / normal / semibold / bold
typestringChange texts font familymain / heading / banner
asstringSet render element. Not working with dangerouslySetInnerHTMLtag name
fontarraySet texts custom font size and line height base on screen sizeArray<{ fontSize: string, lineHeight: string }>
nestedStylesbooleanApply texts styles to all nested elementstrue / false

Size table

TagFont sizeLine height
P1default: 18pxdefault: 26px
P2default: 16pxdefault: 24px
P3default: 14pxdefault: 20px
P4default: 12pxdefault: 16px



Sizes

Examples:

<P1>Lorem, ipsum dolor</P1>
<P2>Lorem, ipsum dolor</P2>
<P3>Lorem, ipsum dolor</P3>
<P4>Lorem, ipsum dolor</P4>

Lorem, ipsum dolor

Lorem, ipsum dolor

Lorem, ipsum dolor

Lorem, ipsum dolor




Weight

Examples:

<P1 weight="light">Lorem, ipsum dolor</P1>
<P1 weight="normal">Lorem, ipsum dolor</P1>
<P1 weight="semibold">Lorem, ipsum dolor</P1>
<P1 weight="bold">Lorem, ipsum dolor</P1>

Lorem, ipsum dolor

Lorem, ipsum dolor

Lorem, ipsum dolor

Lorem, ipsum dolor




Font

Examples:

<P2
font={{
default: { fontSize: '14px', lineHeight: '18px' },
sm: 'none',
md: { fontSize: '16px', lineHeight: '20px' },
lg: { fontSize: '18px', lineHeight: '22px' }
}}
>
Lorem, ipsum dolor
</P2>
<P4
font={{
default: { fontSize: '24px', lineHeight: '28px' },
xs: 'none',
sm: 'none',
md: 'none',
lg: 'none'
}}
>
Lorem, ipsum dolor
</P4>

Lorem, ipsum dolor

Lorem, ipsum dolor




Fonts

Examples:

<P1 type="main">Lorem, ipsum dolor</P1>
<P1 type="heading">Lorem, ipsum dolor</P1>
<P1 type="banner">Lorem, ipsum dolor</P1>

Lorem, ipsum dolor

Lorem, ipsum dolor