fractalsvelte mascot fractalsvelte fractalsvelte

Svelte 5 component · machines-ui · Graphs

GraphFunnel

A proportional funnel showing labeled stages, values, and their relative widths.

Install

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

Usage

Example
<GraphFunnel
  title="INSTALL"
  stage="ship"
  steps={[
    { label: 'docs', value: 12400, display: '12,400' },
    { label: 'copy', value: 4100, display: '4,100' },
    { label: 'ship', value: 860, display: '860' }
  ]}
/>

Props

NameTypeDefault
title string Caption drawn on the top edge as `[ TITLE ]`. Uppercase, 1–2 words.—
steps FunnelStep[] Stages in display order, each with a label, numeric amount, and optional formatted value.—
ticks number Number of character cells used to represent each stage width.20
stage string Label of the stage to emphasize; other stages are dimmed.—
glyphs Glyphs Characters that draw the graph: a preset name (`shade`, `ascii`, `hash`, `bar`) or your own array, lightest to heaviest.—
palette GraphPalette How many accent colours the graph uses: `mono` one, `duo` two, `multi` three.—
corner string Character drawn at each corner of the frame.—
class string ''