- Docs
- Components
- Backgrounds
- ASCII & Glyphs
- ASCII Stream
Streams of characters flowing along ribbons of light
| Name | Type | Default | Description |
|---|---|---|---|
colors | [string, string] | ["#5227FF", "#FF9FFC"] | The two stream colours. The beam and the inner streams take the first, the outer streams warm towards the second, and the flare at the end of the beam is a warm shade derived from the second. |
backgroundColor | string | "#0a0a0a" | Colour behind the streams. On dark backgrounds they glow, on light ones the lines and characters are drawn as ink over soft washes of colour. Pass transparent to pick up the colour of the page. |
shape | "fan" | "funnel" | "funnel" | A fan opens out from the beam in one direction. A funnel pinches through a point and opens on both sides. |
characters | string | "ABCEGKRSXZ0235689" | The characters that ride the streams, up to 64. |
text | string | "" | A message every row spells out over and over, in place of random characters. |
scramble | number | 0.08 | Share of characters that stay random while text is set, from 0 (always legible) to 1. |
shuffle | number | 0.4 | How many times per second each random character changes. 0 keeps them fixed. |
fontFamily | string | system monospace | CSS font family for the characters. A web font is picked up once it has loaded. |
fontWeight | number | string | 700 | Font weight of the characters. |
size | number | 13 | Height of a row of characters beside the beam, in pixels. Rows inside the streams grow as the streams widen. |
spacing | number | 1.2 | Distance between characters along a row, relative to the natural width of the font. |
angle | number | 0 | Direction of flow in degrees clockwise. 0 flows right, 90 flows down, 180 flows left with the characters still reading left to right. In tall containers the stream turns to flow downwards on its own. |
originX | number | 0 | Horizontal position of the point the streams leave the beam from, from -1 (left edge) to 1 (right edge). |
originY | number | 0 | Vertical position of that point, from -1 (top) to 1 (bottom). |
spread | number | 1 | How wide the streams open by the time they reach the far edge. |
curve | number | 1.1 | How strongly the streams bow away from the beam. 0 gives straight rays. |
skew | number | 0.12 | Makes one side open and bow more than the other, from -1 to 1. 0 is symmetrical. |
streams | number | 6 | Number of streams that carry characters, from 0 to 8. |
rows | number | 3 | Most rows of characters a stream carries. |
lines | number | 1 | Amount of fine lines of light between the streams, from 0 to 1. |
speed | number | 3 | How fast the characters travel, in characters per second. Negative values flow back towards the origin. |
variance | number | 0.3 | How much the speed differs from row to row, from 0 (in step) to 1. |
glyphs | number | 1 | Brightness of the characters. |
pulse | number | 1 | Brightness of the soft highlights that drift along each stream and light the characters they pass. |
pulseSpeed | number | 1 | How fast those highlights drift. Negative values send them back towards the origin. |
sheen | number | 1 | Strength of the soft sheets of light that fill each stream. |
beam | number | 1 | Brightness of the central beam, its glow and the characters beside it. 0 hides it. |
flare | number | 1 | Strength of the warm flare where the beam leaves the frame. 0 turns it off. |
glow | number | 1 | Bloom around everything bright. |
grain | number | 0.2 | Film grain over everything that is lit, from 0 (none) to 1. The empty background stays clean. |
intensity | number | 1 | Overall brightness. |
fade | number | 0 | Fades the streams out towards the edges of the frame, from 0 to 1. |
burstEvery | number | 6 | Seconds between the bursts of light that travel down the beam into the flare. 0 turns them off. |
intro | boolean | true | Sweep the streams in from the origin when the component first appears. |
interactive | boolean | true | Respond to the pointer and to touch. |
ignite | number | 1 | How brightly a stream lights up when the pointer or a finger crosses it. The light starts where it was crossed and runs out along the stream. 0 turns it off. |
burst | number | 1 | Strength of the burst fired by a click or tap, and of the automatic ones. 0 turns them off. |
seed | number | 0 | 0 keeps the designed arrangement of streams. Other values vary their positions, brightness and colours. |
paused | boolean | false | Freeze the motion. Users who prefer reduced motion always get a still frame. |
quality | number | 1 | Render resolution from 0.25 to 1. It also lowers itself when frames run slow. |
ref | { burst } | — | burst(strength) fires a burst from code. Strength defaults to 1. |
children | ReactNode | — | Content placed over the streams. |
className | string | — | Classes for the root element. It fills its parent, with a 240px minimum height. |
style | CSSProperties | — | Inline styles for the root element. |
colors[string, string]The two stream colours. The beam and the inner streams take the first, the outer streams warm towards the second, and the flare at the end of the beam is a warm shade derived from the second.
["#5227FF", "#FF9FFC"]backgroundColorstringColour behind the streams. On dark backgrounds they glow, on light ones the lines and characters are drawn as ink over soft washes of colour. Pass transparent to pick up the colour of the page.
"#0a0a0a"shape"fan" | "funnel"A fan opens out from the beam in one direction. A funnel pinches through a point and opens on both sides.
"funnel"charactersstringThe characters that ride the streams, up to 64.
"ABCEGKRSXZ0235689"textstringA message every row spells out over and over, in place of random characters.
""scramblenumberShare of characters that stay random while text is set, from 0 (always legible) to 1.
0.08shufflenumberHow many times per second each random character changes. 0 keeps them fixed.
0.4fontFamilystringCSS font family for the characters. A web font is picked up once it has loaded.
system monospacefontWeightnumber | stringFont weight of the characters.
700sizenumberHeight of a row of characters beside the beam, in pixels. Rows inside the streams grow as the streams widen.
13spacingnumberDistance between characters along a row, relative to the natural width of the font.
1.2anglenumberDirection of flow in degrees clockwise. 0 flows right, 90 flows down, 180 flows left with the characters still reading left to right. In tall containers the stream turns to flow downwards on its own.
0originXnumberHorizontal position of the point the streams leave the beam from, from -1 (left edge) to 1 (right edge).
0originYnumberVertical position of that point, from -1 (top) to 1 (bottom).
0spreadnumberHow wide the streams open by the time they reach the far edge.
1curvenumberHow strongly the streams bow away from the beam. 0 gives straight rays.
1.1skewnumberMakes one side open and bow more than the other, from -1 to 1. 0 is symmetrical.
0.12streamsnumberNumber of streams that carry characters, from 0 to 8.
6rowsnumberMost rows of characters a stream carries.
3linesnumberAmount of fine lines of light between the streams, from 0 to 1.
1speednumberHow fast the characters travel, in characters per second. Negative values flow back towards the origin.
3variancenumberHow much the speed differs from row to row, from 0 (in step) to 1.
0.3glyphsnumberBrightness of the characters.
1pulsenumberBrightness of the soft highlights that drift along each stream and light the characters they pass.
1pulseSpeednumberHow fast those highlights drift. Negative values send them back towards the origin.
1sheennumberStrength of the soft sheets of light that fill each stream.
1beamnumberBrightness of the central beam, its glow and the characters beside it. 0 hides it.
1flarenumberStrength of the warm flare where the beam leaves the frame. 0 turns it off.
1glownumberBloom around everything bright.
1grainnumberFilm grain over everything that is lit, from 0 (none) to 1. The empty background stays clean.
0.2intensitynumberOverall brightness.
1fadenumberFades the streams out towards the edges of the frame, from 0 to 1.
0burstEverynumberSeconds between the bursts of light that travel down the beam into the flare. 0 turns them off.
6introbooleanSweep the streams in from the origin when the component first appears.
trueinteractivebooleanRespond to the pointer and to touch.
trueignitenumberHow brightly a stream lights up when the pointer or a finger crosses it. The light starts where it was crossed and runs out along the stream. 0 turns it off.
1burstnumberStrength of the burst fired by a click or tap, and of the automatic ones. 0 turns them off.
1seednumber0 keeps the designed arrangement of streams. Other values vary their positions, brightness and colours.
0pausedbooleanFreeze the motion. Users who prefer reduced motion always get a still frame.
falsequalitynumberRender resolution from 0.25 to 1. It also lowers itself when frames run slow.
1ref{ burst }burst(strength) fires a burst from code. Strength defaults to 1.
—childrenReactNodeContent placed over the streams.
—classNamestringClasses for the root element. It fills its parent, with a 240px minimum height.
—styleCSSPropertiesInline styles for the root element.
—