fractalsvelte mascot fractalsvelte fractalsvelte

Svelte 5 component · machines-ui · Graphs

GraphTimer

A live timer that counts time elapsed since an instant, time since it happened, or shows the local clock.

Install

GraphTimer is a Svelte 5 ASCII timer chart component in @fractaldesign/machines-ui. It works in SvelteKit and in any Svelte 5 app.

pnpm add @fractaldesign/machines-ui

Import

import
import '@fractaldesign/machines-ui/style.css';
import { GraphTimer } from '@fractaldesign/machines-ui';

Usage

Example
<GraphTimer title="UPTIME" kind="elapsed" at="2026-08-01T00:00:00Z" caption="api" />

Props

NameTypeDefault
title string Caption drawn on the top edge as `[ TITLE ]`. Uppercase, 1–2 words.—
kind TimerKind What to count: time `elapsed` since `at`, time `ago` since `at`, or the local `clock`.'elapsed'
at Date | number | string Instant to count from, as a Date, epoch milliseconds, or an ISO string.—
caption string Muted line drawn under the value.—
corner string Character drawn at each corner of the frame.—
class string ''