Skip to content

Infographic

The Infographic component (ui:infographic) renders multi-section visual summaries. Each section can contain stats, progress bars, facts, text, pie charts, dividers, and ratings. Consecutive items of the same type are automatically grouped for optimized layout.

Examples

View Glyph Markdown source
```ui:infographic
title: Company Overview
sections:
- heading: Key Metrics
items:
- type: stat
label: Revenue
value: "$12.5M"
- type: stat
label: Customers
value: "2,340"
- type: stat
label: Growth
value: "+28%"
- heading: Goals Progress
items:
- type: progress
label: Q4 Target
value: 78
- type: progress
label: Customer Satisfaction
value: 92
```

Mixed content

View Glyph Markdown source
```ui:infographic
title: Project Report
sections:
- items:
- type: text
content: "The Q4 results exceeded expectations across all key metrics."
- type: stat
label: Revenue
value: "$8.2M"
- type: stat
label: Profit
value: "$2.1M"
- type: progress
label: Annual Target
value: 91
- type: fact
icon: "\u2713"
text: Largest quarter in company history
- type: fact
icon: "\u2713"
text: Customer base grew 34% year-over-year
```

Pie charts

Pie items render as SVG donut charts by default. Set donut: false for a filled pie, or customize size and individual slice color values.

View Glyph Markdown source
```ui:infographic
title: Revenue by Region
sections:
- items:
- type: pie
label: Donut (default)
slices:
- label: North America
value: 42
- label: Europe
value: 28
- label: Asia Pacific
value: 18
- label: Other
value: 12
- type: pie
label: Solid pie
donut: false
size: 120
slices:
- label: Enterprise
value: 55
color: "#6366f1"
- label: Business
value: 30
color: "#06b6d4"
- label: Starter
value: 15
color: "#f43f5e"
```

Ratings

Rating items display star indicators with support for half-star precision and a custom max scale.

View Glyph Markdown source
```ui:infographic
title: Restaurant Review
sections:
- heading: Scores
items:
- type: rating
label: Food Quality
value: 5
description: Exceptional seasonal menu
- type: rating
label: Ambiance
value: 4.5
description: Cozy and well-lit
- type: rating
label: Service
value: 4
- type: rating
label: Wait Time
value: 2.5
description: Busy weekends
- heading: Quick Score (3-star scale)
items:
- type: rating
label: Would Visit Again
value: 3
max: 3
- type: rating
label: Recommend to Friend
value: 2.5
max: 3
```

Dividers

Divider items visually separate content within a section. Three styles are available: solid (default), dashed, and dotted.

View Glyph Markdown source
```ui:infographic
title: Divider Styles
sections:
- items:
- type: stat
label: Users
value: "12,400"
- type: divider
- type: stat
label: Revenue
value: "$3.1M"
- type: divider
style: dashed
- type: progress
label: Q4 Target
value: 78
- type: divider
style: dotted
- type: fact
icon: "\u2713"
text: All systems operational
```

Full dashboard

All seven item types combined into a multi-section dashboard.

View Glyph Markdown source
```ui:infographic
title: SaaS Product Dashboard — Q4 2025
sections:
- heading: Key Metrics
items:
- type: stat
label: MRR
value: "$842K"
description: "+12% MoM"
- type: stat
label: Active Users
value: "24,800"
description: "+3,200 this month"
- type: stat
label: Churn
value: "1.4%"
description: Down from 2.1%
- heading: Customer Satisfaction
items:
- type: rating
label: NPS Score
value: 4.5
description: "Promoters: 72%"
- type: rating
label: Support Rating
value: 4
description: "Avg. resolution: 2.4 hrs"
- type: divider
- type: fact
icon: "\u2713"
text: CSAT improved 8 points since Q3
- type: fact
icon: "\u2713"
text: First response time under 15 minutes
- heading: Revenue Breakdown
items:
- type: pie
label: By Plan
slices:
- label: Enterprise
value: 55
- label: Business
value: 30
- label: Starter
value: 12
- label: Free Trial
value: 3
- type: pie
label: By Region
slices:
- label: Americas
value: 48
- label: EMEA
value: 32
- label: APAC
value: 20
- heading: OKR Progress
items:
- type: progress
label: Reach $1M MRR
value: 84
- type: progress
label: Ship V2 Platform
value: 92
- type: progress
label: Expand to 3 New Markets
value: 67
- type: divider
style: dashed
- type: text
content: "Overall OKR attainment is on track. The latency goal requires additional infrastructure investment planned for January."
```

Properties

PropertyTypeRequiredDefaultDescription
titlestringNoOptional heading displayed above all sections.
sectionsInfographicSection[]YesArray of 1—8 section objects (see below).
markdownbooleanNofalseEnable inline markdown formatting (bold, italic, links, code) in text fields.

InfographicSection

PropertyTypeRequiredDefaultDescription
headingstringNoBold heading displayed at the top of the section.
itemsInfographicItem[]YesArray of items (min 1). Each item is one of the types below.

Item types

Items use a discriminated union on the type field:

stat

PropertyTypeRequiredDescription
type"stat"YesDiscriminator.
labelstringYesLabel below the value.
valuestringYesLarge display value (e.g. “$2.3M”).
descriptionstringNoAdditional context below the label.

fact

PropertyTypeRequiredDescription
type"fact"YesDiscriminator.
iconstringNoIcon prefix (emoji or character).
textstringYesFact text.

progress

PropertyTypeRequiredDescription
type"progress"YesDiscriminator.
labelstringYesLabel for the progress bar.
valuenumberYesPercentage 0—100.
colorstringNoCustom fill color (CSS value).

text

PropertyTypeRequiredDescription
type"text"YesDiscriminator.
contentstringYesParagraph text.

pie

PropertyTypeRequiredDescription
type"pie"YesDiscriminator.
labelstringNoTitle above the chart.
slicesPieSlice[]YesArray of 1—12 slices (see below).
donutbooleanNoRender as donut (default true).
sizenumberNoDiameter in px, 80—300 (default 160).

PieSlice

PropertyTypeRequiredDescription
labelstringYesLegend label.
valuenumberYesPositive numeric value (proportional).
colorstringNoCustom fill color (CSS value).

divider

PropertyTypeRequiredDescription
type"divider"YesDiscriminator.
style"solid" | "dashed" | "dotted"NoLine style (default "solid").

rating

PropertyTypeRequiredDescription
type"rating"YesDiscriminator.
labelstringYesLabel for the rating.
valuenumberYesRating value 0—5 (supports halves).
maxnumberNoMaximum stars 1—5 (default 5).
descriptionstringNoAdditional context text.

Markdown Support

Enable inline markdown formatting in text items and descriptions:

View Glyph Markdown source
```ui:infographic
title: Company Overview
sections:
- heading: Key Metrics
items:
- type: text
content: "Our **Q4 results** exceeded expectations. Read the [full report](https://example.com)."
- type: stat
label: "Revenue *YoY*"
value: "$12.5M"
description: "Up **28%** from Q3"
- type: fact
icon: "\u2713"
text: "Largest quarter in `company.history`"
- type: rating
label: "Customer **NPS**"
value: 4.5
description: "Score improved from *4.2* last quarter"
markdown: true
```

Supported formatting: bold, italic, code, links

Learn more about markdown in components →

Accessibility

  • The component renders with role="region" and aria-label set to the title (or “Infographic” if no title).
  • Progress bars use role="progressbar" with aria-valuenow, aria-valuemin="0", and aria-valuemax="100".
  • Each progress bar includes an aria-label with the label and percentage (e.g. “Sprint Progress: 80%”).
  • Fact icons use aria-hidden="true" so they do not interfere with screen readers.
  • Pie chart SVGs use role="img" with an aria-label describing the chart and all slice values.
  • Dividers use role="separator" for assistive technology.
  • Rating stars are aria-hidden="true" with an aria-label like “4.5 out of 5 stars” on the star container.

Custom CSS variables

VariableLight defaultDark defaultDescription
--glyph-infographic-track#e0e4ea#2a3550Progress bar track background.
--glyph-infographic-color-1#3b82f6#60a5faFirst progress fill color.
--glyph-infographic-color-2#22c55e#4ade80Second progress fill color.
--glyph-infographic-color-3#f59e0b#fbbf24Third progress fill color.
--glyph-infographic-color-4#ef4444#f87171Fourth progress fill color.
--glyph-infographic-section-divider#d0d8e4#1a2035Border between sections.
--glyph-infographic-star#f59e0b#fbbf24Star fill color for ratings.