Typography

The Typography component provides standardized text styling across the application.

When To Use

  • When need to display title or paragraph contents in Articles/Blogs/Notes.
  • When you need copyable/editable/ellipsis texts.

Example Usage

Title Component

Display title in different level.

H1

H1 Heading

H2

H2 Heading

H3

H3 Heading

Text Component

Provides multiple types of text.

Body

Most fonts have a particular weight which corresponds to one of the numbers in Common weight name mapping. However some fonts, called variable fonts, can support a range of weights with a more or less fine granularity, and this can give the designer a much closer degree of control over the chosen weight.

BodyHEAVY

Most fonts have a particular weight which corresponds to one of the numbers in Common weight name mapping. However some fonts, called variable fonts, can support a range of weights with a more or less fine granularity.

Body Small

Most fonts have a particular weight which corresponds to one of the numbers in Common weight name mapping.

Body SmallHEAVY

Most fonts have a particular weight which corresponds to one of the numbers in Common weight name mapping.

Polymorphism

You can use the as prop to render the component as any valid HTML element while maintaining the visual style of the variant.

Span looking like H1

API

Property
Description
Type
Default

as

The HTML element or component to render as. 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'a' | 'div' 'p'

variant

The visual style variant of the typography. 'h1' | 'h2' | 'h3' | 'body' | 'body-heavy' | 'body-small' | 'body-small-heavy' 'body'

class

Additional CSS classes to apply. string -