0Views
0Copies

API Reference
Props for <PrismDataStream />
| Prop | Type | Default | Description |
|---|---|---|---|
| backgroundColor | string | "#05060b" | The surface under the stream; fully transparent shows the page through. |
| colors | string[] | ["#8a7dff","#5ee6ff","#62f5b1","#ffd166","#ff7aa2"] | In order; each chart spreads its lanes across the whole list. |
| rawColor | string | "rgba(206, 218, 255, 0.4)" | The streaks before they reach the prism. |
| accentColor | string | "#5ee6ff" | The light where the beam strikes the glass, and the live dot. |
| glowColor | string | "#3d7bff" | The light around and inside the prism. |
| glassColor | string | "#242c4e" | The prism's near side; its darker end is derived from it. |
| faceColor | string | "#7896ff" | The pane the lanes leave through. |
| edgeColor | string | "#d2e1ff" | The prism's far edges and the soft reflection across it. |
| rimColor | string | "#ffffff" | The brightest edge of the prism: its ridge and its lit side. |
| textColor | string | "#ffffff" | Titles and labels. |
| labelColor | string | "rgba(6, 7, 12, 0.78)" | The label boxes' fill. |
| labelBorderColor | string | "rgba(255, 255, 255, 0.09)" | The label boxes' hairline. |
| upColor | string | "#62f5b1" | A rising trend. |
| downColor | string | "#ff7aa2" | A falling trend. |
| gridColor | string | "rgba(255, 255, 255, 0.05)" | The share and time lines behind the lanes. |
| dotColor | string | "rgba(244, 246, 255, 0.09)" | The dot pattern over the surface; fully transparent removes it. |
| Prop | Type | Default | Description |
|---|---|---|---|
| events | string[] | ["Page view · /pricing","New signup · Google","Button click · Upgrade","Session · iPhone","Payment $48 · US","Payment $129 · Germany","Refund $12 · Japan","Payment $64 · Brazil","Error 500 · Billing","Login failed · Auth","Request OK · API","Error 502 · API","New lead · Referral","Deal won · Partner","Trial started · Ads","New lead · Email","Order saved · France","User updated · Desktop","Order saved · Canada","Visit · Tablet"] | What raw events say about themselves. |
| rawTitle | string | "Your raw data" | The small title over the raw side; empty hides it. |
| rawCaption | string | "Every event, as it happens" | The line under it, hidden on phones; empty hides it. |
| liveLabel | string | "Live" | Ends the chart’s title; empty hides it and its dot. |
| timeLabel | string | "{time}s ago" | Under the time lines, {time} being the seconds; empty hides it. |
| font | FontValue | {"fontFamily":"Funnel Sans"} | Titles and lane labels. |
| monoFont | FontValue | {"fontFamily":"Fragment Mono"} | Event tags and time labels. |
| textScale | number | 1 | All text and label boxes. |
| Prop | Type | Default | Description |
|---|---|---|---|
| labelRadius | number | 6 | The label boxes' corner radius. |
| speed | number | 1 | Overall speed. |
| rawSpeed | number | 3.5 | How fast raw events drift in, in widths a second. |
| sortedSpeed | number | 7 | How fast sorted events travel out, in widths a second. |
| cycleEvery | number | 7 | How long each chart stays; 0 stays on the first. |
| rush | number | 6 | How much faster the sorted side runs until a new chart has arrived. |
| turbulence | number | 20 | How far raw events wander. |
| density | number | 1 | How many events there are. |
| rawTrail | number | 0.12 | How far a raw streak trails behind its event. |
| sortedTrail | number | 0.18 | How far a sorted streak trails behind its event. |
| rawThickness | number | 1.1 | A raw streak's thickness. |
| sortedThickness | number | 1.6 | A sorted streak’s thickness. |
| maxStreamHeight | number | 520 | In a taller container the stream sits in the middle. |
| prismSize | number | 62 | Its height, in % of the stream's height. |
| prismMaxSize | number | 220 | The tallest it may be; about half that on phones. |
| prismPosition | number | 50 | Where it stands across the width. |
| mobilePrismPosition | number | 36 | Where it stands across the width on phones. |
| beam | number | 10 | How thin the raw events squeeze before the prism. |
| fanLength | number | 16 | How far past the prism the lanes take to open. |
| laneGap | number | 6 | The gap between open lanes. |
| glow | number | 1 | The light in and around the prism. |
| afterglow | number | 1 | The color washed over the surface behind the lanes. |
| interactive | boolean | true | The cursor parts the events and draws the prism’s light. |
| pushRadius | number | 110 | How far around the cursor events are pushed. |
| pushStrength | number | 1 | How hard they are pushed. |
| Prop | Type | Default | Description |
|---|---|---|---|
| charts | Array<{ title, answer, sorting, swing, lanes }> | [{"title":"Revenue by region","answer":"{lane} brings in {share} of revenue","sorting":"Sorting by region","swing":0.32,"lanes":"North America | NA | 38\nEurope | EU | 29\nAsia Pacific | APAC | 22\nLatin America | LATAM | 11"},{"title":"Signups by source","answer":"{share} of new signups come from {lane}","sorting":"Sorting by source","swing":0.45,"lanes":"Google search | Search | 34\nPaid ads | Ads | 26\nReferral | Referral | 18\nPartners | Partners | 12\nEmail | Email | 10"},{"title":"Errors by service","answer":"{lane} causes {share} of all errors","sorting":"Sorting by service","swing":0.55,"lanes":"API | API | 46\nLogin | Login | 24\nBilling | Billing | 30"},{"title":"Visits by device","answer":"{share} of visits happen on {lane}","sorting":"Sorting by device","swing":0.25,"lanes":"Desktop | Desktop | 52\nMobile | Mobile | 40\nTablet | Tablet | 8"}] | The stream sorts into them one after another. |
| showTitles | boolean | true | The titles over the stream. |
| showLabels | boolean | true | The lanes' names and shares at the right edge. |
| showGrid | boolean | true | The share and time lines behind the lanes. |
| trendWindow | number | 6 | How far back each trend compares; 0 hides the trends. |
| eventTags | number | 3 | How many raw events say what they are at once. |
| eventEvery | number | 1.3 | The time between one tag and the next. |
| eventDuration | number | 3 | How long a tag stays. |
| Prop | Type | Default | Description |
|---|---|---|---|
| padding | number | 56 | Between the labels and the sides; less on tablets and phones. |
| edgeFade | number | 3 | How far the left and right ends fade out. |
| dotSpacing | number | 22 | The spacing of the dot pattern. |
| Prop | Type | Default | Description |
|---|---|---|---|
| chart | number | — | The chart to show, counted from 0; leave it out to let the stream step through them by itself. |
| onChartChange | (chart: number) => void | — | Called with the chart the stream steps on to by itself. |
Motion score
Compositor-only
- Category
- Animations
- Framework
- React
- Published
- Nov 27, 2026
- Dependencies
- Variants
Prism Data Stream: a prism animation for React
A stream of data points flows into a glowing prism and splits into colored bands, one per region, each labeled with its share of revenue. It turns a live breakdown into a single picture people understand at a glance.
Use Prism Data Stream to show where revenue, traffic or events come from, live, in a way a pie chart never could. It's a Pro React component for Next.js, Vite and Astro with Tailwind CSS v4. More in this category.
What is Prism Data Stream?#
Prism Data Stream is a prism animation for React that turns a stream of events into a split of colored bands. Data flows into the prism from one side and fans out on the other, with each band labeled, such as North America or Europe with its percentage.
How Prism Data Stream works#
Small points of data travel into a bright prism. On the far side, the stream splits into colored bands that spread across the screen, each one tagged with a region and its share, like Europe at 34% of revenue. A headline above it calls out the key number.
Customization options#
Replace the regions, labels and percentages with your own data, and change the band colors to match your brand. Open the Customize panel on the component page to try colors in the live preview, then install it. After install, the source is yours to edit.
Use cases#
- SaaS and analytics landing pages that want to show data in motion.
- Revenue or traffic breakdowns in a hero or a feature section.
- Investor and launch pages where one striking visual tells the story.
FAQs#
A prism animation splits one stream into several colored bands, like light passing through a glass prism. Here it shows how one flow of data divides into parts.
Yes. Replace the regions, labels and percentages with your own figures. You get the full source code, so the data is yours to wire up.
No. It's a Pro component, included in every paid plan. Anything you install stays yours after a plan ends.
React in Next.js, Vite and Astro, styled with Tailwind CSS v4. In a JavaScript project, the CLI converts it to
.jsx as it installs.