Display
Cards, tables, badges, avatars, charts, kanban, carousel.
# Cards
Standard Card
Sharp corners by default
This is a standard card with header and content.
Squircle Card
iOS-style continuous corners
Composed with Class: "rounded-xl tc-squircle". Browsers without CSS corner-shape render plain rounded corners.
SimpleCard — no header, just content.
display.Card(display.CardProps{Title: "Users", Subtitle: "Manage your team"}) {
<p>Card content</p>
}
display.Card(display.CardProps{
Title: "Squircle",
BaseProps: utils.BaseProps{Class: "rounded-xl tc-squircle"},
}) { ... }# Stat Cards
# Stat Card Tones
- Users
- 1,204
- Uptime
- 99.9%
- Degraded
- 3 Increased by +2
- Failures
- 7 Increased by +5
- Custom
- 12
display.StatCard(display.StatCardProps{Label: "Uptime", Icon: icons.CheckCircle, Tone: display.StatToneGreen})# Badges
# Buttons
display.Button(display.ButtonProps{Text: "Save", Variant: display.ButtonPrimary})# Avatars
# Modal (native dialog)
@display.Modal(display.ModalProps{Title: "Confirm", Size: display.ModalSizeMD}) {
<p>Are you sure?</p>
}# Drawer (native dialog)
# Command Palette (⌘K)
Click the button or press ⌘K / Ctrl+K. Type to filter; arrow keys move; Enter selects.
# Dropdown
# Tooltip
# Popover
Popover content
Any content can go here.
# Accordion (native details)
What is templ-components?
How do I install it?
Is it production-ready?
# Tabs
# Tabs (Pills variant)
# Table
| Name ↑ | Role | |
|---|---|---|
| Alice Smith | alice@example.com | Admin |
| Bob Jones | bob@example.com | User |
display.Table(display.TableProps{
Headers: []string{"Name", "Email", "Role"},
Rows: []display.TableRow{
display.SimpleTableRow("Alice", "alice@example.com", "Admin"),
},
Striped: true,
Hover: true,
})# Table in Card (Flush + Compact)
Recent Users
| Name | Status | |
|---|---|---|
| Alice Smith | alice@example.com | Active |
| Bob Jones | bob@example.com | Invited |
# DataTable (sort + pagination)
# PageHeader
User Settings
Manage your account preferences and security options
# SectionHeading + DateRange
Experience
SectionHeading — configurable h1–h6 level, alignment, subtitle
@display.DateRange(display.DateRangeProps{
Start: &start, // End nil renders "Present"
Layout: display.DateFormatJan2_2006,
})# Definition List
- User ID
- usr_01JXEXAMPLE
- admin@example.com
- Plan
- Enterprise
# Definition Grid
- CPU
- 42%
- Memory
- 8.2 GB
- Disk
- 156 GB
- Uptime
- 99.9%
- Requests
- 1.2K/s
- Latency
- 12ms
# Grid + Container Query Grid
- Normal grid
- 42
- Responsive
- 12ms
- To viewport
- 99.9%
Container-responsive (resize this box):
- Requests/s
- 42
- Latency
- 12ms
- Uptime
- 99.9%
display.Grid(display.GridProps{Cols: display.GridCols3, Gap: display.GridGapLG}) {
for _, u := range users {
@display.Card(display.CardProps{Title: u.Name}) { <p>{ u.Email }</p> }
}
}# Fluid Typography (container query units)
Container-aware metric
Revenue scales with this card's width:
$4.2M
Heading in a narrow container
Text shrinks smoothly as the container narrows via cqi units.
# Empty States
No data to display.
# CopyButton
# RelativeTime
# CountBadge
# ListNote
# Eyebrow & Scrollback
Deploy #142 · production
Build pipeline
# Image
# HoverCard
Hover details
Shows on hover or focus.
# ContextMenu
Right-click the area below:
# Carousel
# Sparklines & Bar Charts
Message Trend
Top Channels
# SVG Charts (Line, Pie, Area)
Revenue Trend
Revenue vs Expenses
Active Users
Traffic Sources
Storage Usage
# External Links
# Collapsible Sections
Advanced Settings
These settings are open by default. Users can collapse this section to focus on the overview.
Debug Information
Version: v1.21.0 Build: 2026-10-14T03:10:06Z
# Heatmap
Weekly Activity Heatmap
| 00:00 | 04:00 | 08:00 | 12:00 | 16:00 | 20:00 | 24:00 | |
|---|---|---|---|---|---|---|---|
| Sun | · | ||||||
| Mon | · | ||||||
| Tue | |||||||
| Wed | · | ||||||
| Thu | · | ||||||
| Fri | |||||||
| Sat |