fractalsvelte mascot fractalsvelte fractalsvelte

Svelte 5 component · machines-ui · Frame

GraphTrack

Horizontal track that spans the frame. Use for graphs that represent a range (meter, stack, bullet, rank) — pair with GraphTick so ticks flex edge to edge. Packed graphs (spark, bars, cells, uptime) should not use tracks.

Install

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

Usage

Example
<GraphTrack>
  <GraphTick>█</GraphTick>
  <GraphTick>█</GraphTick>
  <GraphTick>░</GraphTick>
  <GraphTick>░</GraphTick>
</GraphTrack>

Props

NameTypeDefault
class string ''
children Snippet Content rendered inside the component.—

Snippets

NameTypeDefault
default unknown —