Typography
Headings, body text and code in HeroUI's type sizes.
Headings, body text and code in HeroUI's type sizes.
npm install @heroui/react
First time with HeroUI? Set it up once.
/**
* Demo from HeroUI, https://heroui.com (docs example typography/default.tsx).
* Apache-2.0, Copyright 2025 NextUI Inc. Full text: https://github.com/heroui-inc/heroui/blob/main/LICENSE
* Changed for Tastebud: a default export (HeroUI's docs use named ones).
*/
import {Typography} from "@heroui/react";
export default function TypographyDemo() {
return (
<div className="flex max-w-xl flex-col gap-4">
<Typography type="h1">Build better interfaces</Typography>
<Typography type="h2">Typography that stays semantic</Typography>
<Typography type="h3">Composable by default</Typography>
<Typography type="h4">Small heading</Typography>
<Typography>
HeroUI Typography uses React Aria Components Text as the primitive, with semantic typography
types and render-prop polymorphism.
</Typography>
<Typography color="muted" type="body-sm">
Smaller muted body copy for secondary descriptions.
</Typography>
<Typography type="code">pnpm add @heroui/react</Typography>
</div>
);
}
Changed for this site: A default export (HeroUI's docs use named ones).