Heading & Text components that powers typography in telegraph
npm install @telegraph/typography
Pick one:
Via CSS (preferred):
@import "@telegraph/typography"
Via Javascript:
import "@telegraph/typography/style.css"
Then, include
className="tgph"
on the farthest parent element wrapping the telegraph components
import { Heading } from "@telegraph/typography"
...
<Heading>Heading</Heading>
Name | Type | Default | Options |
---|---|---|---|
as | string | null | "h1" "h2" "h3" "h4" "h5" "h6" |
size | string | "2" | "1" "2" "3" "4" "5" "6" "7" "8" "9" |
color | string | "default" | "default" "gray" "red" "beige" "blue" "green" "yellow" "purple" "accent" "disabled" "white" |
align | string | null | "left" "right" "center" |
import { Text } from "@telegraph/typography"
...
<Text>Text</Text>
Name | Type | Default | Options |
---|---|---|---|
as | string | null | "p" "span" "div" "label" "em" "strong" "b" "i" "pre" "code" |
size | string | "2" | "1" "2" "3" "4" "5" "6" "7" "8" "9" |
color | string | "default" | "default" "gray" "red" "beige" "blue" "green" "yellow" "purple" "accent" "disabled" "white" |
align | string | null | "left" "right" "center" |
weight | string | regular | "regular" "medium" |