fractalsvelte mascot fractalsvelte fractalsvelte

Svelte 5 component · machines-ui · Graphs

GraphCountdown

Time left until a date.

Install

GraphCountdown is a Svelte 5 ASCII countdown 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 { GraphCountdown } from '@fractaldesign/machines-ui';

Usage

Example
<GraphCountdown
  title="FREEZE"
  to="2027-01-01T00:00:00Z"
  done="open"
  caption="until launch"
/>

Props

NameTypeDefault
title string Caption drawn on the top edge as `[ TITLE ]`. Uppercase, 1–2 words.—
to Date | number | string Date, timestamp, or date string to count down to.—
done string Text shown instead of the timer once the target time has passed.'done'
caption string Optional text displayed beneath the remaining time.—
corner string Character drawn at each corner of the frame.—
class string ''