Typography
Typography
Text components for headings, paragraphs, descriptions, and formatted content.
Headings
Title and Subtitle components for page and section headings.
Page Title
Section Subtitle
123456789101112package showcase import ( popui "github.com/invopop/popui/go" ) templ TypographyHeadings() { <div class="space-y-4"> @popui.Title() { Page Title } @popui.Subtitle() { Section Subtitle } </div> }
Paragraphs
Standard paragraph and description text components.
This is a standard paragraph with default styling.
This is a description with secondary text color.
123456789101112package showcase import ( popui "github.com/invopop/popui/go" ) templ TypographyParagraphs() { <div class="space-y-2"> @popui.P() { This is a standard paragraph with default styling. } @popui.Description() { This is a description with secondary text color. } </div> }
Inline Text
Mark component for highlighted text.
This paragraph contains highlighted text using the Mark component.
12345678910111213package showcase import ( popui "github.com/invopop/popui/go" ) templ TypographyInline() { @popui.P() { <span>This paragraph contains </span> @popui.Mark() { highlighted text } <span> using the Mark component.</span> } }
Alert Messages
Info and Warning components with icons.
This is a warning message with an alert icon.
123456789101112package showcase import ( popui "github.com/invopop/popui/go" ) templ TypographyAlerts() { <div class="space-y-3"> @popui.Info() { This is an informational message with an icon. } @popui.Warning() { This is a warning message with an alert icon. } </div> }
Prose
Wrapper for raw HTML with Tailwind prose styling.
Prose Heading
This component wraps raw HTML with Tailwind prose styling for consistent typography.
- Automatically styled lists
- Formatted headings
- Consistent spacing
1234567891011121314151617package showcase import ( popui "github.com/invopop/popui/go" ) templ TypographyProse() { @popui.Prose() { <h1>Prose Heading</h1> <p>This component wraps raw HTML with Tailwind prose styling for consistent typography.</p> <ul> <li>Automatically styled lists</li> <li>Formatted headings</li> <li>Consistent spacing</li> </ul> } }
API Reference
Title
H1 heading element with bold styling.
| Name | Type | Default | Description |
|---|---|---|---|
ID | string | - | Unique identifier |
Class | string | - | Additional CSS classes |
Attributes | templ.Attributes | - | Additional HTML attributes |
Subtitle
H2 subheading element with medium weight.
| Name | Type | Default | Description |
|---|---|---|---|
ID | string | - | Unique identifier |
Class | string | - | Additional CSS classes |
Attributes | templ.Attributes | - | Additional HTML attributes |
P
Standard paragraph element.
| Name | Type | Default | Description |
|---|---|---|---|
ID | string | - | Unique identifier |
Class | string | - | Additional CSS classes |
Attributes | templ.Attributes | - | Additional HTML attributes |
Description
Paragraph with secondary text color.
| Name | Type | Default | Description |
|---|---|---|---|
ID | string | - | Unique identifier |
Class | string | - | Additional CSS classes |
Attributes | templ.Attributes | - | Additional HTML attributes |
Mark
Inline highlighted text element.
| Name | Type | Default | Description |
|---|---|---|---|
ID | string | - | Unique identifier |
Class | string | - | Additional CSS classes |
Attributes | templ.Attributes | - | Additional HTML attributes |
Info
Informational message with icon.
| Name | Type | Default | Description |
|---|---|---|---|
ID | string | - | Unique identifier |
Class | string | - | Additional CSS classes |
Attributes | templ.Attributes | - | Additional HTML attributes |
Warning
Warning message with alert icon.
| Name | Type | Default | Description |
|---|---|---|---|
ID | string | - | Unique identifier |
Class | string | - | Additional CSS classes |
Attributes | templ.Attributes | - | Additional HTML attributes |
Prose
Container for raw HTML with Tailwind prose styling.
| Name | Type | Default | Description |
|---|---|---|---|
ID | string | - | Unique identifier |
Class | string | - | Additional CSS classes |
Attributes | templ.Attributes | - | Additional HTML attributes |