npm

@vygruppen/spor-typography-react
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

Typography (React)

The typography package consists of all the components you need to add text to your app.

Installation

$ npm install @vygruppen/spor-typography-react

Usage

import { Text, Paragraph, Heading } from "@vygruppen/spor-typography-react";

Text aka Paragraph

A simple paragraph of text.

This component has an alias - Text and Paragraph is the exact same component. Text reads nicer, but Text is also a window global, which will make it troublesome to import automatically.

You can specify all the styles you want as props, including fontSize and color.

<Text>Choo choo, goes the train</Text>
<Paragraph fontSize="sm">In Norwegian, trains go "tøff tøff tøff"</Paragraph>

Heading

A heading, that defaults to a H2 with fontSize="xl".

You can override the heading level with the as prop:

<Heading as="h1" fontSize="2xl">
  Huge news!
</Heading>

Development

Please refer to the root readme for development notes.

Readme

Keywords

none

Package Sidebar

Install

npm i @vygruppen/spor-typography-react

Weekly Downloads

6

Version

1.1.3

License

MIT

Unpacked Size

11.6 kB

Total Files

21

Last publish

Collaborators

  • alice.clausen
  • leiferikbjorkli
  • teresita-halvorsen