HomeLabHire Me
ml-ui10 components

Get started

IntroductionInstallation

UI

Dots

Dot CalendarNewDot CodeNew

Dither

Dither GlobeNew

Text

Ink PrintNew

Data viz

Dither

Dither MapNew

Media

Dots

Dot WaveformNew

AI

Diffusion ImageNew

Backgrounds

Koi PondNewMarigoldsNewWhite BlossomNew

ml-ui / Backgrounds

Koi Pond

Koi drift through a pond made of type, each with a mind of its own. Hold the cursor still and they come to see if you have food; click to feed them.

Needs: None. A 2D canvas.

Inspired by the ASCII koi pond on Dao Ho's site (daoho.dev)

Customize

Props

PropTypeDefaultDescription
koinumber7How many koi, up to 16.
cellnumber14Size of one character cell in px. Smaller cells draw finer fish.
colorstring"#e0702c"Koi patch colour. The deeper red patches are a darker shade of it.
inkstring""Glyphs, pale koi and ripples. Empty uses the theme foreground (--mlui-fg).
glyphsstring".:xX%S8"Characters from faint to dense, laid across each body by how full and lit it is.
dampingnumber0.985How long ripples last. Higher rings travel further.
speednumber1Time scale for swimming and ripples. 0 freezes the pond.
interactivebooleantrueCursor ripples and click to feed. Clicks are read on the window, so links and buttons above keep theirs.
seednumber7Picks each koi's pattern and where they start.
backgroundstring"transparent"Painted behind the pond.
opacitynumber1Opacity of the koi and ripples over the background.
avoidstring"[data-koi-avoid]"CSS selector for elements the koi swim around: any on the page that overlap the pond.
onEat(eaten: number) => void–Called with the running count each time a koi eats a pellet.
dprnumbernullDevice pixel ratio to render at. Math.min(devicePixelRatio, 2) when unset.
classNamestring–Class on the root element, which fills its parent.
styleCSSProperties–Style on the root element. Theme it through the --mlui-* variables.
Marigolds →