Svelte 5 component · machines-ui · Animated
GraphLife
Conway's Game of Life in block glyphs, framed. Alive is accent, the dead leave a faint trail.
Install
GraphLife is a Svelte 5 animated ASCII life component in @fractaldesign/machines-ui. It works in SvelteKit and in any Svelte 5 app.
pnpm add @fractaldesign/machines-uiImport
import '@fractaldesign/machines-ui/style.css';
import { GraphLife } from '@fractaldesign/machines-ui';Usage
<GraphLife title="LIFE" />Props
| Name | Type | Default |
|---|---|---|
title | string Caption drawn on the top edge as `[ TITLE ]`. | — |
cols | number Columns of the board. Default 44. | 44 |
rows | number Rows of the board. Default 14. | 14 |
density | number Random fill probability when no `seed` is given. Default 0.28. | 0.28 |
seed | boolean[][] Explicit initial board. Padded/cropped to `cols` x `rows`. | — |
seedNum | number PRNG seed for the random board, reproducible. Default 7. | 7 |
speedMs | number Milliseconds per generation. Default 220. | 220 |
animated | boolean Start playing on mount. Default true. Reduced motion starts paused. | true |
showControls | boolean Show the playback controls. Default true. | true |
corner | string Character at each corner of the frame. Default "+". | — |
class | string | '' |
Related components
GraphMandala A lotus mandala drawn in terminal glyphs, blooming outward ring by ring and then slowly rotating.GraphMandel ASCII Mandelbrot with a slow cinematic zoom into seahorse valley.GraphPulse A live health strip: a window of blips — ok, degraded, or down — appended at a fixed interval, newest on the…GraphRain A looping character-art rain animation with adjustable trails and dimensions.GraphScatter An ASCII scatter plot: x/y points mapped onto a grid, with optional accent points and a linear-trend strip.GraphScope An oscilloscope window that scrolls a data series leftwards, drawing each column as a line or as an area…