Code fonts
The same snippet at different sizes and in different monospace fonts. Look at 0 vs O, l vs 1, braces, and how wide each line runs.
Sizes (JetBrains Mono)
tsx
"use client";
import { useState } from "react";
import styles from "./Counter.module.css";
export function Counter({ start = 0 }: { start?: number }) {
const [count, setCount] = useState(start);
return (
<button className={styles.button} onClick={() => setCount((c) => c + 1)}>
Clicked {count} {count === 1 ? "time" : "times"}
</button>
);
}tsx
"use client";
import { useState } from "react";
import styles from "./Counter.module.css";
export function Counter({ start = 0 }: { start?: number }) {
const [count, setCount] = useState(start);
return (
<button className={styles.button} onClick={() => setCount((c) => c + 1)}>
Clicked {count} {count === 1 ? "time" : "times"}
</button>
);
}tsx
"use client";
import { useState } from "react";
import styles from "./Counter.module.css";
export function Counter({ start = 0 }: { start?: number }) {
const [count, setCount] = useState(start);
return (
<button className={styles.button} onClick={() => setCount((c) => c + 1)}>
Clicked {count} {count === 1 ? "time" : "times"}
</button>
);
}tsx
"use client";
import { useState } from "react";
import styles from "./Counter.module.css";
export function Counter({ start = 0 }: { start?: number }) {
const [count, setCount] = useState(start);
return (
<button className={styles.button} onClick={() => setCount((c) => c + 1)}>
Clicked {count} {count === 1 ? "time" : "times"}
</button>
);
}tsx
"use client";
import { useState } from "react";
import styles from "./Counter.module.css";
export function Counter({ start = 0 }: { start?: number }) {
const [count, setCount] = useState(start);
return (
<button className={styles.button} onClick={() => setCount((c) => c + 1)}>
Clicked {count} {count === 1 ? "time" : "times"}
</button>
);
}Fonts at 15px
tsx
"use client";
import { useState } from "react";
import styles from "./Counter.module.css";
export function Counter({ start = 0 }: { start?: number }) {
const [count, setCount] = useState(start);
return (
<button className={styles.button} onClick={() => setCount((c) => c + 1)}>
Clicked {count} {count === 1 ? "time" : "times"}
</button>
);
}tsx
"use client";
import { useState } from "react";
import styles from "./Counter.module.css";
export function Counter({ start = 0 }: { start?: number }) {
const [count, setCount] = useState(start);
return (
<button className={styles.button} onClick={() => setCount((c) => c + 1)}>
Clicked {count} {count === 1 ? "time" : "times"}
</button>
);
}tsx
"use client";
import { useState } from "react";
import styles from "./Counter.module.css";
export function Counter({ start = 0 }: { start?: number }) {
const [count, setCount] = useState(start);
return (
<button className={styles.button} onClick={() => setCount((c) => c + 1)}>
Clicked {count} {count === 1 ? "time" : "times"}
</button>
);
}tsx
"use client";
import { useState } from "react";
import styles from "./Counter.module.css";
export function Counter({ start = 0 }: { start?: number }) {
const [count, setCount] = useState(start);
return (
<button className={styles.button} onClick={() => setCount((c) => c + 1)}>
Clicked {count} {count === 1 ? "time" : "times"}
</button>
);
}tsx
"use client";
import { useState } from "react";
import styles from "./Counter.module.css";
export function Counter({ start = 0 }: { start?: number }) {
const [count, setCount] = useState(start);
return (
<button className={styles.button} onClick={() => setCount((c) => c + 1)}>
Clicked {count} {count === 1 ? "time" : "times"}
</button>
);
}tsx
"use client";
import { useState } from "react";
import styles from "./Counter.module.css";
export function Counter({ start = 0 }: { start?: number }) {
const [count, setCount] = useState(start);
return (
<button className={styles.button} onClick={() => setCount((c) => c + 1)}>
Clicked {count} {count === 1 ? "time" : "times"}
</button>
);
}tsx
"use client";
import { useState } from "react";
import styles from "./Counter.module.css";
export function Counter({ start = 0 }: { start?: number }) {
const [count, setCount] = useState(start);
return (
<button className={styles.button} onClick={() => setCount((c) => c + 1)}>
Clicked {count} {count === 1 ? "time" : "times"}
</button>
);
}tsx
"use client";
import { useState } from "react";
import styles from "./Counter.module.css";
export function Counter({ start = 0 }: { start?: number }) {
const [count, setCount] = useState(start);
return (
<button className={styles.button} onClick={() => setCount((c) => c + 1)}>
Clicked {count} {count === 1 ? "time" : "times"}
</button>
);
}tsx
"use client";
import { useState } from "react";
import styles from "./Counter.module.css";
export function Counter({ start = 0 }: { start?: number }) {
const [count, setCount] = useState(start);
return (
<button className={styles.button} onClick={() => setCount((c) => c + 1)}>
Clicked {count} {count === 1 ? "time" : "times"}
</button>
);
}tsx
"use client";
import { useState } from "react";
import styles from "./Counter.module.css";
export function Counter({ start = 0 }: { start?: number }) {
const [count, setCount] = useState(start);
return (
<button className={styles.button} onClick={() => setCount((c) => c + 1)}>
Clicked {count} {count === 1 ? "time" : "times"}
</button>
);
}Related
- Highlight
The Highlight text component: a faint blue tint with square corners, whose side padding repeats on every line it wraps across.
- Muted text
Muted text styles and color nudges for intros, descriptions and meta lines, each shown in a realistic page sample.
- Body text
Candidate body text grays, from light grays to purple-grays, each shown with a heading, muted intro and paragraphs.
- Heading fonts
Candidate heading fonts over the real body text, at the real heading sizes.