Skip to Content
StylingFont Size

Font Size

Use fontSize prop to control the font-size of an element.

Name

Styles

xs
sm
md
lg
xl
2xl
3xl
4xl
inherit

Documentation

Usage

sm

The quick brown fox jumps over the lazy dog.

md

The quick brown fox jumps over the lazy dog.

lg

The quick brown fox jumps over the lazy dog.

xl

The quick brown fox jumps over the lazy dog.

2xl

The quick brown fox jumps over the lazy dog.

import { Text } from "@optiaxiom/react"; import { Canvas } from "../Canvas"; export function App() { return ( <Canvas name="fontSize"> <Text fontSize="sm">The quick brown fox jumps over the lazy dog.</Text> <Text fontSize="md">The quick brown fox jumps over the lazy dog.</Text> <Text fontSize="lg">The quick brown fox jumps over the lazy dog.</Text> <Text fontSize="xl">The quick brown fox jumps over the lazy dog.</Text> <Text fontSize="2xl">The quick brown fox jumps over the lazy dog.</Text> </Canvas> ); }
Last updated on