Documentation
Data displayGlass surface
Chart
Frames metric headers, SVG plots, and captions for lightweight data visualization.
01
See it in context
Preview
Revenue
Last five quarters
02
Copy a working example
Usage
---
import { Chart } from '@santi020k/lumen-astro'
---
<Chart aria-labelledby="chart-revenue-title">
<header>
<div>
<h3 id="chart-revenue-title">Revenue</h3>
<p>Last five quarters</p>
</div>
<strong data-ui-chart-value>$128.4K</strong>
</header>
<svg viewBox="0 0 120 40" role="img" aria-label="Revenue trend">
<defs>
<linearGradient id="chart-revenue-fill" x1="0" x2="0" y1="0" y2="1">
<stop offset="0%" stop-color="currentColor" stop-opacity="0.22" />
<stop offset="100%" stop-color="currentColor" stop-opacity="0" />
</linearGradient>
</defs>
<path d="M0 35 L30 26 L60 18 L90 22 L120 8 L120 40 L0 40 Z" fill="url(#chart-revenue-fill)" />
<path d="M0 35 L30 26 L60 18 L90 22 L120 8" fill="none" stroke="currentColor" stroke-width="3" />
<g fill="currentColor">
<circle cx="30" cy="26" r="1.6" />
<circle cx="60" cy="18" r="1.6" />
<circle cx="90" cy="22" r="1.6" />
<circle cx="120" cy="8" r="1.6" />
</g>
</svg>
<figcaption>Revenue is up 42% since Q1 after a temporary Q4 dip.</figcaption>
</Chart>---
import { Chart } from '@santi020k/lumen-astro'
---
<Chart aria-labelledby="chart-revenue-title">
<header>
<div>
<h3 id="chart-revenue-title">Revenue</h3>
<p>Last five quarters</p>
</div>
<strong data-ui-chart-value>$128.4K</strong>
</header>
<svg viewBox="0 0 120 40" role="img" aria-label="Revenue trend">
<defs>
<linearGradient id="chart-revenue-fill" x1="0" x2="0" y1="0" y2="1">
<stop offset="0%" stop-color="currentColor" stop-opacity="0.22" />
<stop offset="100%" stop-color="currentColor" stop-opacity="0" />
</linearGradient>
</defs>
<path d="M0 35 L30 26 L60 18 L90 22 L120 8 L120 40 L0 40 Z" fill="url(#chart-revenue-fill)" />
<path d="M0 35 L30 26 L60 18 L90 22 L120 8" fill="none" stroke="currentColor" stroke-width="3" />
<g fill="currentColor">
<circle cx="30" cy="26" r="1.6" />
<circle cx="60" cy="18" r="1.6" />
<circle cx="90" cy="22" r="1.6" />
<circle cx="120" cy="8" r="1.6" />
</g>
</svg>
<figcaption>Revenue is up 42% since Q1 after a temporary Q4 dip.</figcaption>
</Chart>import { Chart } from '@santi020k/lumen-react'
export const Example = () => (
<>
<Chart aria-labelledby="chart-revenue-title">
<header>
<div>
<h3 id="chart-revenue-title">Revenue</h3>
<p>Last five quarters</p>
</div>
<strong data-ui-chart-value>$128.4K</strong>
</header>
<svg viewBox="0 0 120 40" role="img" aria-label="Revenue trend">
<defs>
<linearGradient id="chart-revenue-fill" x1="0" x2="0" y1="0" y2="1">
<stop offset="0%" stopColor="currentColor" stopOpacity="0.22" />
<stop offset="100%" stopColor="currentColor" stopOpacity="0" />
</linearGradient>
</defs>
<path d="M0 35 L30 26 L60 18 L90 22 L120 8 L120 40 L0 40 Z" fill="url(#chart-revenue-fill)" />
<path d="M0 35 L30 26 L60 18 L90 22 L120 8" fill="none" stroke="currentColor" strokeWidth="3" />
<g fill="currentColor">
<circle cx="30" cy="26" r="1.6" />
<circle cx="60" cy="18" r="1.6" />
<circle cx="90" cy="22" r="1.6" />
<circle cx="120" cy="8" r="1.6" />
</g>
</svg>
<figcaption>Revenue is up 42% since Q1 after a temporary Q4 dip.</figcaption>
</Chart>
</>
)import { Chart } from '@santi020k/lumen-react'
export const Example = () => (
<>
<Chart aria-labelledby="chart-revenue-title">
<header>
<div>
<h3 id="chart-revenue-title">Revenue</h3>
<p>Last five quarters</p>
</div>
<strong data-ui-chart-value>$128.4K</strong>
</header>
<svg viewBox="0 0 120 40" role="img" aria-label="Revenue trend">
<defs>
<linearGradient id="chart-revenue-fill" x1="0" x2="0" y1="0" y2="1">
<stop offset="0%" stopColor="currentColor" stopOpacity="0.22" />
<stop offset="100%" stopColor="currentColor" stopOpacity="0" />
</linearGradient>
</defs>
<path d="M0 35 L30 26 L60 18 L90 22 L120 8 L120 40 L0 40 Z" fill="url(#chart-revenue-fill)" />
<path d="M0 35 L30 26 L60 18 L90 22 L120 8" fill="none" stroke="currentColor" strokeWidth="3" />
<g fill="currentColor">
<circle cx="30" cy="26" r="1.6" />
<circle cx="60" cy="18" r="1.6" />
<circle cx="90" cy="22" r="1.6" />
<circle cx="120" cy="8" r="1.6" />
</g>
</svg>
<figcaption>Revenue is up 42% since Q1 after a temporary Q4 dip.</figcaption>
</Chart>
</>
)<script type="module">
import { defineLumenElements } from '@santi020k/lumen-elements/define'
defineLumenElements()
</script>
<lumen-chart aria-labelledby="chart-revenue-title">
<header>
<div>
<h3 id="chart-revenue-title">Revenue</h3>
<p>Last five quarters</p>
</div>
<strong data-ui-chart-value>$128.4K</strong>
</header>
<svg viewBox="0 0 120 40" role="img" aria-label="Revenue trend">
<defs>
<linearGradient id="chart-revenue-fill" x1="0" x2="0" y1="0" y2="1">
<stop offset="0%" stop-color="currentColor" stop-opacity="0.22" />
<stop offset="100%" stop-color="currentColor" stop-opacity="0" />
</linearGradient>
</defs>
<path d="M0 35 L30 26 L60 18 L90 22 L120 8 L120 40 L0 40 Z" fill="url(#chart-revenue-fill)" />
<path d="M0 35 L30 26 L60 18 L90 22 L120 8" fill="none" stroke="currentColor" stroke-width="3" />
<g fill="currentColor">
<circle cx="30" cy="26" r="1.6" />
<circle cx="60" cy="18" r="1.6" />
<circle cx="90" cy="22" r="1.6" />
<circle cx="120" cy="8" r="1.6" />
</g>
</svg>
<figcaption>Revenue is up 42% since Q1 after a temporary Q4 dip.</figcaption>
</lumen-chart><script type="module">
import { defineLumenElements } from '@santi020k/lumen-elements/define'
defineLumenElements()
</script>
<lumen-chart aria-labelledby="chart-revenue-title">
<header>
<div>
<h3 id="chart-revenue-title">Revenue</h3>
<p>Last five quarters</p>
</div>
<strong data-ui-chart-value>$128.4K</strong>
</header>
<svg viewBox="0 0 120 40" role="img" aria-label="Revenue trend">
<defs>
<linearGradient id="chart-revenue-fill" x1="0" x2="0" y1="0" y2="1">
<stop offset="0%" stop-color="currentColor" stop-opacity="0.22" />
<stop offset="100%" stop-color="currentColor" stop-opacity="0" />
</linearGradient>
</defs>
<path d="M0 35 L30 26 L60 18 L90 22 L120 8 L120 40 L0 40 Z" fill="url(#chart-revenue-fill)" />
<path d="M0 35 L30 26 L60 18 L90 22 L120 8" fill="none" stroke="currentColor" stroke-width="3" />
<g fill="currentColor">
<circle cx="30" cy="26" r="1.6" />
<circle cx="60" cy="18" r="1.6" />
<circle cx="90" cy="22" r="1.6" />
<circle cx="120" cy="8" r="1.6" />
</g>
</svg>
<figcaption>Revenue is up 42% since Q1 after a temporary Q4 dip.</figcaption>
</lumen-chart>03
Choose your target
Add this component
Choose the package for your runtime. All adapters share the Lumen stylesheet. Use the matching registry command when you want a local wrapper for that framework.
pnpm add @santi020k/lumen-astropnpm add @santi020k/lumen-astrolumen add Chartlumen add Chartpnpm add @santi020k/lumen-reactpnpm add @santi020k/lumen-reactlumen add Chart --target reactlumen add Chart --target reactpnpm add @santi020k/lumen-elementspnpm add @santi020k/lumen-elementslumen add Chart --target elementslumen add Chart --target elementsGlass
Add the glass prop to apply the shared blur, saturation, border, and highlight tokens. Glass reads best over vivid content, so place the surface above imagery or color.
Coverage
94%+6 pts---
import { Badge, Chart } from '@santi020k/lumen-astro'
---
<div class="docs-glass-demo">
<Chart aria-label="Glass adoption" glass>
<header>
<h3>Coverage</h3>
<strong data-ui-chart-value>94%</strong>
<Badge variant="success">+6 pts</Badge>
</header>
<svg viewBox="0 0 120 40" role="img" aria-label="Coverage trend">
<path d="M0 34 L24 28 L48 22 L72 18 L96 12 L120 7" fill="none" stroke="currentColor" stroke-width="3" />
</svg>
<figcaption>Glass support is available across surface primitives.</figcaption>
</Chart>
</div>---
import { Badge, Chart } from '@santi020k/lumen-astro'
---
<div class="docs-glass-demo">
<Chart aria-label="Glass adoption" glass>
<header>
<h3>Coverage</h3>
<strong data-ui-chart-value>94%</strong>
<Badge variant="success">+6 pts</Badge>
</header>
<svg viewBox="0 0 120 40" role="img" aria-label="Coverage trend">
<path d="M0 34 L24 28 L48 22 L72 18 L96 12 L120 7" fill="none" stroke="currentColor" stroke-width="3" />
</svg>
<figcaption>Glass support is available across surface primitives.</figcaption>
</Chart>
</div>import { Badge, Chart } from '@santi020k/lumen-react'
export const Example = () => (
<>
<div className="docs-glass-demo">
<Chart aria-label="Glass adoption" glass>
<header>
<h3>Coverage</h3>
<strong data-ui-chart-value>94%</strong>
<Badge variant="success">+6 pts</Badge>
</header>
<svg viewBox="0 0 120 40" role="img" aria-label="Coverage trend">
<path d="M0 34 L24 28 L48 22 L72 18 L96 12 L120 7" fill="none" stroke="currentColor" strokeWidth="3" />
</svg>
<figcaption>Glass support is available across surface primitives.</figcaption>
</Chart>
</div>
</>
)import { Badge, Chart } from '@santi020k/lumen-react'
export const Example = () => (
<>
<div className="docs-glass-demo">
<Chart aria-label="Glass adoption" glass>
<header>
<h3>Coverage</h3>
<strong data-ui-chart-value>94%</strong>
<Badge variant="success">+6 pts</Badge>
</header>
<svg viewBox="0 0 120 40" role="img" aria-label="Coverage trend">
<path d="M0 34 L24 28 L48 22 L72 18 L96 12 L120 7" fill="none" stroke="currentColor" strokeWidth="3" />
</svg>
<figcaption>Glass support is available across surface primitives.</figcaption>
</Chart>
</div>
</>
)<script type="module">
import { defineLumenElements } from '@santi020k/lumen-elements/define'
defineLumenElements()
</script>
<div class="docs-glass-demo">
<lumen-chart aria-label="Glass adoption" glass>
<header>
<h3>Coverage</h3>
<strong data-ui-chart-value>94%</strong>
<lumen-badge variant="success">+6 pts</lumen-badge>
</header>
<svg viewBox="0 0 120 40" role="img" aria-label="Coverage trend">
<path d="M0 34 L24 28 L48 22 L72 18 L96 12 L120 7" fill="none" stroke="currentColor" stroke-width="3" />
</svg>
<figcaption>Glass support is available across surface primitives.</figcaption>
</lumen-chart>
</div><script type="module">
import { defineLumenElements } from '@santi020k/lumen-elements/define'
defineLumenElements()
</script>
<div class="docs-glass-demo">
<lumen-chart aria-label="Glass adoption" glass>
<header>
<h3>Coverage</h3>
<strong data-ui-chart-value>94%</strong>
<lumen-badge variant="success">+6 pts</lumen-badge>
</header>
<svg viewBox="0 0 120 40" role="img" aria-label="Coverage trend">
<path d="M0 34 L24 28 L48 22 L72 18 L96 12 L120 7" fill="none" stroke="currentColor" stroke-width="3" />
</svg>
<figcaption>Glass support is available across surface primitives.</figcaption>
</lumen-chart>
</div>API reference
Lumen-specific props and runtime attributes for the Astro primitive. React props follow the same names; Elements use equivalent kebab-case attributes where custom elements expose them.
| Attribute | Values | Default | Description |
|---|---|---|---|
| glass | boolean | "subtle" | "strong" | false | Applies the tokenized liquid-glass surface treatment with backdrop-filter fallbacks; "subtle" and "strong" adjust the fill intensity. |
| class, className | string | "" | Merges custom classes with the generated ui-* root classes. |
| ...native attributes | HTML attributes | - | Forwards standard attributes to the root element unless the component consumes them. |