Typography

Beautifully styled typographic elements for consistent text presentation.

Beautiful Typography

Create stunning text layouts with our comprehensive typography system.

From headings to paragraphs, bold text to italics, and everything in between. Our typography components provide consistent styling across your entire application.

Installation

CLI

Install the component using the StarUI CLI:

star add typography

Examples

Headings

All heading levels from Display to H6

Display Heading

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Text Variants

Different text styles for various content types

This is lead text. It stands out with larger font size and muted color, perfect for introductions.

This is a regular paragraph. It contains the main body text with comfortable spacing and readability. Use it for most of your content.

This is large text for emphasis.

This is default body text using the Text component.

This is small text for secondary information.

This is muted text for less important content.

Blog Post

Complete blog post layout with typography

Technology • 5 min read

The Future of Web Development

Exploring emerging trends and technologies shaping the web


The web development landscape is evolving rapidly, with new frameworks, tools, and methodologies emerging constantly.

In recent years, we've witnessed a significant shift in how we build web applications. The rise of component-based architectures, server-side rendering, and edge computing has fundamentally changed our approach to web development.

Key Trends to Watch

Several important trends are shaping the future of web development:

    AI-powered development toolsWebAssembly adoptionProgressive Web Apps (PWAs)Serverless architecturesMicro-frontends
The best way to predict the future is to invent it. — Alan Kay

As developers, we must stay adaptable and continue learning to remain relevant in this rapidly changing field.

Code Documentation

API reference with inline code and keyboard shortcuts

API Reference

Component usage documentation

Installation

Install the package using your preferred package manager:

npm install @starui/components

Usage

Import the Button component and use it in your application:

import { Button } from '@starui/components'

Props

The component accepts the following props:

    variant - Visual style variant (default: 'default')
    size - Button size (default: 'default')
    disabled - Whether button is disabled (default: false)

Keyboard Shortcuts

The following keyboard shortcuts are available:

+ K - Open command palette

+ Shift + P - Open preferences

Esc - Close dialog

Text Emphasis

Using marks, emphasis, and strong text

Understanding Typography in Design

Typography is more than just choosing fonts. It's about creating hierarchy, improving readability, and establishing visual rhythm in your designs.

Why Typography Matters

Good typography can make or break a design. It affects:

    Readability - How easily users can read your content
    Hierarchy - How users navigate through information
    Mood - The emotional response to your design
    Brand Identity - How users perceive your brand
Typography is the craft of endowing human language with a durable visual form.

When choosing typography for your project, consider the context, audience, and purpose of your content.

Prose Component

Automatic typography styling for long-form content

Using the Prose Component

The Prose component automatically styles its children with beautiful typography defaults. It's perfect for rendering markdown content or long-form articles.

Features

    Automatic spacing between elementsBeautiful default stylesDark mode supportResponsive font sizes

You can also control the size of the prose content:

prose-smproseprose-lgprose-xl
The Prose component makes your content look professional with minimal effort.

Figures & Captions

Images and content with descriptive captions

Visual Content

Images and figures can be enhanced with proper captions:

Figure 1: Example image with descriptive caption explaining the visual content

Captions provide context and improve accessibility for visual content.


You can also use figures for code blocks, charts, or any content that benefits from a caption.

Complete Article

Full article layout with all typography elements

Tutorial • Advanced • 15 min read

Master Typography

A comprehensive guide to beautiful text on the web

DesignTypographyUI/UX

Typography is the foundation of great design. This guide will teach you everything you need to know about creating beautiful, readable text for the web.

The Basics

Every great typographic system starts with a solid foundation. This includes choosing the right typeface, establishing a type scale, and defining spacing rules.

1. Choose Your Typeface

Select fonts that complement each other. A common approach is pairing a serif font for headings with a sans-serif for body text.

2. Establish Hierarchy

Use different sizes, weights, and styles to create visual hierarchy:

    Headlines - Large, bold, attention-grabbing
    Subheadings - Medium size, clear structure
    Body text - Comfortable reading size
    Captions - Small, supplementary information
Good typography is invisible. Great typography is unforgettable.

Advanced Techniques

Once you've mastered the basics, explore advanced techniques like variable fonts, fluid typography, and optical sizing.

Pro Tips

    Use a modular scale for consistent sizingMaintain 45-75 characters per line for optimal readabilityAdjust line-height based on font size and line lengthUse proper kerning and letter-spacingTest your typography on different devices

Last updated: December 2024 • Written by the StarUI Team

API Reference

Component Description
Headings Headings Display → H6. `H2(section=True)` draws a section divider.
Text Components `P`, `Lead`, `Large`, `Small`, `Muted`, `Subtitle`, `Caption`, and `Text(variant='body'|'lead'|'large'|'small'|'muted')
Inline Elements `InlineCode`, `Kbd`, `Mark`, `Strong`, `Em` for inline emphasis and notation.
Block Elements `Blockquote`, `List(ordered=True|False)`, `Hr`, `Figure`, `Figcaption`.
Prose Typography wrapper to style content; supports sizes.