StylingFont Size

Font Size

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

Name

Value

Pixels

xs

sm

md

lg

xl

2xl

3xl

4xl

5xl

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>
  );
}