Typography System
Typography showcases a set of foundational text styles built with simple, reusable CSS to ensure consistency and readability across the interface. It demonstrates examples of heading levels, body text, muted text, and caption text, providing a clear visual hierarchy for content. Designed as a baseline typographic system, it helps maintain a cohesive look and makes it easy to apply uniform text styles throughout your application.
uiclass-variance-authority
Installation
$npx futureuikit add text-system
Import
import { Heading } from "@/components/ui/typography"
Named Keys & Props
Pass these exact named keys as props on <Heading />. Click any color pill to copy the prop.
colorDefault is "default"(Black & White)variantVisual style"h1""h2""h3""h4""h5""h6"shapeCorner shape"default""square""rounded""sharp"spacingInner spacing"default""2x""4x""6x""8x"Usage Example
A basic implementation example to get you started.
Example Implementation
import { Heading, Text, Label, Code } from"@/components/ui/typography";
export default function Example() {
return (
<div className="space-y-4">
<Heading variant="h1">Hello World</Heading>
<Text variant="lead">This is a reusable typography system.</Text>
<div className="flex items-center gap-2">
<Label>Version:</Label>
<Code>v1.0.0</Code>
</div>
</div>
);
}Features
Key capabilities and highlights.
Key Capabilities
- ◆Demonstrates heading levels to create a clear content hierarchy.
- ◆Includes body text styles optimized for readability and spacing.
- ◆Shows muted text for secondary or less prominent information.
- ◆Provides caption text styles for labels and small annotations.
- ◆Uses simple, reusable CSS rules for consistent typography.
- ◆Helps maintain a uniform text system across the entire UI.
Notes
Important implementation details to consider.
Implementation Details
- ◆Install: Run'npx futureuikit add text-system'.
- ◆Import:'import { Heading, Text, Label, Code } from "@/components/ui/typography";'
- ◆Headings: Use'Heading'with'variant'props from'h1'to'h6'.
- ◆Body Text: Use'Text'with variants like'lead','large','small','muted', or'blockquote'.
- ◆Labels: Use the'Label'component for form titles and metadata captions.
- ◆In-line Code: Use the'Code'component for technical terms or short snippets.