logo

Aki UI

アキ ウイ

Typography

タイポグラフィ

A wrapper that applies the type scale to plain HTML, so markdown or CMS output picks up headings, lists, quotes, code and tables without touching each tag. Built with Tailwind arbitrary variants, no plugin required.

Deploying to the edge

A short introduction that sits above the body copy and reads slightly larger.

Every push to main triggers a build. Preview deployments are created for pull requests, and the production alias only moves once the build passes.

What gets cached

  • Static assets, immutable for a year
  • Server responses, revalidated on demand
  • Build artifacts, reused across deployments
Cache invalidation is hard, so we made it explicit.
RegionLatency
Paris12 ms
Frankfurt18 ms

Measured from a cold start, median of 100 requests.

Installation

Install the following dependencies:1

npm install clsxnpm install tailwind-merge

Copy and paste the following code into a new component file:2

"use client"

import type { HTMLAttributes } from "react"
import { cn } from "@/lib/utils"

const headings = [
"[&_h1]:mt-0 [&_h1]:text-2xl [&_h1]:font-semibold [&_h1]:leading-8 [&_h1]:tracking-tight [&_h1]:text-[#21201C] dark:[&_h1]:text-[#EEEEEC]",
"[&_h2]:mt-10 [&_h2]:border-b-[1px] [&_h2]:border-[#EBEBEB] [&_h2]:pb-2 [&_h2]:text-xl [&_h2]:font-semibold [&_h2]:leading-7 [&_h2]:tracking-tight [&_h2]:text-[#21201C] dark:[&_h2]:border-[#222222] dark:[&_h2]:text-[#EEEEEC]",
"[&_h3]:mt-8 [&_h3]:text-lg [&_h3]:font-semibold [&_h3]:leading-6 [&_h3]:tracking-tight [&_h3]:text-[#21201C] dark:[&_h3]:text-[#EEEEEC]",
"[&_h4]:mt-8 [&_h4]:text-base [&_h4]:font-medium [&_h4]:leading-6 [&_h4]:text-[#21201C] dark:[&_h4]:text-[#EEEEEC]",

How to use it3

"use client"

import { Typography, TypographyLead, TypographyMuted } from "@/components/ui/typography"

export default function Page() {
return (
<Typography>
<h2>Deploying to the edge</h2>

<TypographyLead>

Props

Typography

NameDefaultDescription
children

ReactNode

Rich text to style, usually rendered markup you do not control

className

string

Additional classes on the wrapper, use it to override the 65ch max width

TypographyLead

NameDefaultDescription
children

ReactNode

Intro paragraph, larger than body copy

className

string

Additional classes on the paragraph

TypographyLarge

NameDefaultDescription
children

ReactNode

Emphasised block of text at the base size

className

string

Additional classes on the block

TypographySmall

NameDefaultDescription
children

ReactNode

Small label, rendered as a small element

className

string

Additional classes on the label

TypographyMuted

NameDefaultDescription
children

ReactNode

Secondary note in the muted colour

className

string

Additional classes on the note