Stat
Shows one short number, drawn large in the accent gradient, with a label under it.
<arc-stat>Overview
Stat shows one number with a short uppercase label under it. The value is drawn at weight 200 in the accent gradient with a glow, and a short gradient rule separates it from the label.
size scales the whole block. md is the default, sm fits a strip of vitals beside other content, and lg is for a hero figure. plain draws the value in the text color with no gradient, glow or rule, so it doesn't compete with a dense layout.
trend="up" or "down" adds a green or red arrow below the label, and "neutral" adds a muted dash. change sets the text beside it, such as "+12%".
Guidelines
Do
- Put three or four Stats side by side in a flex container or arc-section
- Keep values short, such as "99.9%", "<50ms" or "1,204"
- Keep labels to one or two words
- Use `::part(value)` to give a value a different gradient
Don't
- Don't use Stat for long text. It's sized for short numbers
- Don't make the value bold. The display is built around weight 200
- Don't put links or buttons in `value` or `label`. Both render as plain text
Features
- At `md` the value is `clamp(32px, 4.5vw, 48px)`, so it scales with the viewport without media queries
- The label is set in Tomorrow (`--font-label`) with wide letter spacing
Preview
Usage
<arc-stat value="99.9%" label="Uptime"></arc-stat>
<arc-stat value="<50ms" label="Response Time"></arc-stat>
<arc-stat value="24/7" label="Support"></arc-stat>import { Stat } from '@arclux/arc-ui-react';
export default function Example() {
return (
<>
<Stat value="99.9%" label="Uptime" />
<Stat value="<50ms" label="Response Time" />
</>
);
}<script setup>
import { Stat } from '@arclux/arc-ui-vue';
</script>
<template>
<Stat value="99.9%" label="Uptime" />
<Stat value="<50ms" label="Response Time"></Stat>
<Stat value="24/7" label="Support" />
</template><script>
import { Stat } from '@arclux/arc-ui-svelte';
</script>
<Stat value="99.9%" label="Uptime" />
<Stat value="<50ms" label="Response Time"></Stat>
<Stat value="24/7" label="Support" />import { Component } from '@angular/core';
import { Stat } from '@arclux/arc-ui-angular';
@Component({
imports: [Stat],
template: `
<arc-stat value="99.9%" label="Uptime"></arc-stat>
<arc-stat value="<50ms" label="Response Time"></arc-stat>
<arc-stat value="24/7" label="Support"></arc-stat>
`,
})
export class MyComponent {}import { Stat } from '@arclux/arc-ui-solid';
export default function Example() {
return (
<>
<Stat value="99.9%" label="Uptime" />
<Stat value="<50ms" label="Response Time"></Stat>
<Stat value="24/7" label="Support" />
</>
);
}import { Stat } from '@arclux/arc-ui-preact';
export default function Example() {
return (
<>
<Stat value="99.9%" label="Uptime" />
<Stat value="<50ms" label="Response Time"></Stat>
<Stat value="24/7" label="Support" />
</>
);
}<!-- Auto-generated by @arclux/prism — do not edit manually -->
<!-- arc-stat — requires stat.css + base.css (or arc-ui.css) -->
<div class="arc-stat">
<div class="stat">
<span class="stat__value">Value</span>
<span class="stat__rule"></span>
<span class="stat__label">Label</span>
</div>
</div><!-- Auto-generated by @arclux/prism — do not edit manually -->
<!-- arc-stat — self-contained, no external CSS needed -->
<div class="arc-stat" style="display: block">
<div style="display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 24px 16px">
<span style="font-size: clamp(32px, 4.5vw, 48px); font-weight: 200; letter-spacing: -1px; line-height: 1; background: linear-gradient(90deg, rgb(77, 126, 247), rgb(139, 92, 246)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; filter: drop-shadow(0 0 16px rgba(77, 126, 247,0.3))
drop-shadow(0 0 40px rgba(139, 92, 246,0.12))">Value</span>
<span style="width: 24px; height: 1px; background: linear-gradient(90deg, transparent, rgb(77, 126, 247), transparent); opacity: 0.4"></span>
<span style="font-family: 'Tomorrow', system-ui, sans-serif; font-weight: 600; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: rgb(124, 124, 137)">Label</span>
</div>
</div>API
valuestring''- The stat value (e.g. "99%")
labelstring''- Label below the value
trend'' | 'up' | 'down' | 'neutral'''- Shows a trend indicator arrow below the label. Empty (the default) shows none; an unrecognised value falls back to empty rather than rendering an uncoloured dash that no
:host([trend=...])rule matches. changestring''- Text displayed next to the trend arrow, typically a percentage like '+12%' or '-3.5%'.
size'sm' | 'md' | 'lg''md'- Scale of the whole stat.
mdis the display size;smis compact, for a strip of vitals beside other content;lgis for a hero figure. plainbooleanfalse- Draws the value in the text colour, without the accent gradient, glow and rule, so a stat can sit in a dense layout without competing with it.