Heading
Renders a heading text node.
Usage
Code
import { createSystem } from 'frog/ui'
const { Heading } = createSystem()
function Example() {
return <Heading>Hello world</Heading>
}
Heading
Properties
align
Sets the horizontal alignment of the text.
Code
function Example() {
return <Heading align="leftrightcenterendstartjustifyright">Hello world</Heading>
}
color
Sets the color of the text.
Values are mapped to the colors
property on the UI System Variables.
Code
function Example() {
return <Heading color="rred100red200red300red400red500red600redred700red800red900red1000ed">Hello world</Heading>
}
decoration
Sets the text decoration.
Code
function Example() {
return <Heading decoration="underlinedasheddottedsolidline-throughunderline">Hello world</Heading>
}
font
Sets the font family of the text.
Values are mapped to the fonts
property on the UI System Variables.
Code
function Example() {
return <Heading font="merriweather">Hello world</Heading>
}
size
Sets the size of the font.
Values are mapped to the fontSizes
property on the UI System Variables.
Code
function Example() {
return <Heading size="12141618202432486432">Hello world</Heading>
}
tracking
Sets the horizontal spacing behavior between text characters.
Values are mapped to the units
property on the UI System Variables.
Code
function Example() {
return <Heading tracking="0123468101214161820222426283032343638404244464852566064728096128160192224256-2-0-1-3-4-6-8-10-12-14-16-18-20-22-24-26-28-30-32-34-36-38-40-42-44-46-48-52-56-60-64-72-80-96-128-160-192-224-256-2">Hello world</Heading>
}
weight
Sets the weight (or boldness) of the font.
Code
function Example() {
return <Heading weight="100200300400500600700800900400">Hello world</Heading>
}
wrap
Defines how the text should be wrapped.
Code
function Example() {
return <Heading wrap="balancebalance">Hello world, this is me.</Heading>
}