Skip to main content

Foundation

Typography

Elicit emotions and convey specific messages to the users

banner-Typography
Square Icon

Selected Theme

Select brand or tribe name to preview style

Default

Typography is defined as the science of style, appearance, and structure of fonts that aim to provide convenience and aesthetics to the reader. Effective typography depends not only on the content but also on the presentation visual of the typography itself, starting from the font type, font size and line height. You can chek out the guideline for more detail description.

import { Heading, Body, Caption } from 'legion-ui';

Heading

Common usage : Hero section, Title content or component, Subtitle of title

PreviewProps NameFont SizeLine Heigh

Heading 1

h160px72px

Heading 2

h248px56px

Heading 3

h336px44px

Heading 4

h430px40px
Heading 5
h524px36px
Heading 6
h620px28px
<Heading size="h1">Heading 1</Heading>
<Heading size="h2">Heading 2</Heading>
<Heading size="h3">Heading 3</Heading>
<Heading size="h4">Heading 4</Heading>
<Heading size="h5">Heading 5</Heading>
<Heading size="h6">Heading 6</Heading>

Body

Common usage : Description, Paragraph, Button, Text Field, Tabs, etc

PreviewProps NameFont SizeLine Heigh
Large Regularlg_regular18px28px
Large Semiboldlg_semibold18px28px
Large Boldlg_bold18px28px
Large Italiclg_italic18px28px
Large Underlinelg_underline18px28px
Large Underline Semiboldlg_underline_semibold18px28px
Large Underline Boldlg_underline_bold18px28px
Small Regularsm_regular16px24px
Small Semiboldsm_semibold16px24px
Small Boldsm_bold16px24px
Small Italicsm_italic16px24px
Small Underlinesm_underline16px24px
Small Underline Semiboldsm_underline_semibold16px24px
Small Underline Boldsm_underline_bold16px24px
<Body size="lg_regular">Large Regular</Body>
<Body size="lg_semibold">Large Semibold</Body>
<Body size="lg_bold">Large Bold</Body>
<Body size="lg_italic">Large Italic</Body>
<Body size="lg_underline">Large Underline</Body>
<Body size="lg_underline_semibold">Large Underline Semibold</Body>
<Body size="lg_underline_bold">Large Underline Bold</Body>
<Body size="sm_regular">Small Regular</Body>
<Body size="sm_semibold">Small Semibold</Body>

Caption

Common usage : Description, Tags, Chips, Badge, etc

PreviewProps NameFont SizeLine Heigh
Large Regularlg_regular14px21px
Large Semiboldlg_semibold14px21px
Large Boldlg_bold14px21px
Large Italiclg_italic14px21px
Large Underlinelg_underline14px21px
Large Underline Semiboldlg_underline_semibold14px21px
Large Underline Boldlg_underline_bold14px21px
Small Regularsm_regular12px18px
Small Semiboldsm_semibold12px18px
Small Boldsm_bold12px18px
Small Italicsm_italic12px18px
Small Underlinesm_underline12px18px
Small Underline Semiboldsm_underline_semibold12px18px
Small Underline Boldsm_underline_bold12px18px
<Caption size="lg_regular">Large Regular</Caption>
<Caption size="lg_semibold">Large Semibold</Caption>
<Caption size="lg_bold">Large Bold</Caption>
<Caption size="lg_italic">Large Italic</Caption>
<Caption size="lg_underline">Large Underline</Caption>
<Caption size="lg_underline_semibold">Large Underline Semibold</Caption>
<Caption size="lg_underline_bold">Large Underline Bold</Caption>
<Caption size="sm_regular">Small Regular</Caption>
<Caption size="sm_semibold">Small Semibold</Caption>

Responsive

You can make the font size responsive base on screen size with add responsive in tag Body, Caption or Heading.

With ResponsiveDesktop Font SizeMobile Font Size

Heading 1

6034

Heading 2

4828

Heading 3

3624

Heading 4

3022
Heading 5
2420
Heading 6
2018
Large Bold1816
Small Bold1614
Large Bold1412
Small Bold1210
<Heading responsive size="h1">Heading 1</Heading>
<Heading responsive size="h2">Heading 2</Heading>
<Heading responsive size="h3">Heading 3</Heading>
<Heading responsive size="h4">Heading 4</Heading>
<Heading responsive size="h5">Heading 5</Heading>
<Heading responsive size="h6">Heading 6</Heading>
<Body responsive variant="lg_bold">Large Bold</Body>
<Body responsive variant="sm_bold">Small Bold</Body>
<Caption responsive size="lg_bold">Large Bold</Caption>

Color

You can also choose any color you want if you wish to by providing color props to either Body, Caption, or Heading component. List of all available colors can be looked in the Color System page.

ComponentColor

Primary 500

primary500

Secondary 400

secondary400
Success 300success300
Warning 500warning500
Info 600info600
Error 700error700
<Heading responsive size="h2" color="primary500">Primary 500</Heading>
<Heading responsive size="h3" color="secondary400">Secondary 400</Heading>
<Body responsive size="lg_bold" color="success300">Success 300</Body>
<Body responsive size="sm_bold" color="warning500">Warning 500</Body>
<Caption responsive size="lg_italic" color="info600">Info 600</Caption>
<Caption responsive size="sm_italic" color="error700">Error 700</Caption>