Skip to content
NewYour data: charts, lists and meters that take your records
<hf-flow>Custom elementData

Flow

Sankey from Chat, Code and API to three models, with particles streaming in proportion to traffic; hovering a band isolates it.

View as Markdown
<hf-flow>

Demo data

The sources, models and 100k request split are invented; only label can be set. It cannot show your own data yet, so use it as a template: replace the invented data in its source before it shows anything real. See Your data.

Playground

Change a prop and the component updates. Props marked live animate to the new value; the others rebuild the element.

Loading <hf-flow>
Props
labellive
<HfFlow label="Where requests go" />

Installation

pnpm dlx shadcn@latest add @lumesec/hf-flow
First timeRegister the @lumesec registry once, or install by URL

Adds @lumesec to your components.json:

pnpm dlx shadcn@latest registry add @lumesec=https://elements.lumesec.ai/r/{name}.json

Or skip the setup and install by URL:

npx shadcn@latest add https://elements.lumesec.ai/r/hf-flow.json

Usage

import { HfFlow } from "@/components/lumesec/hf-flow";

export function Example() {
  return (
    <HfFlow />
  );
}

Behaviour

A sankey from surfaces to models, with particles streaming along each band in proportion to its traffic. Hover a band to isolate it.

API reference

Attributes

labelReact proplabelTypestringDefaultWhere requests go

Heading text. Observed.

Accessibility

  • The canvas has role="img" with an aria-label that lists every flow, for example Chat: 12k to Large, 26k to Medium, 8k to Small.
  • Node names and totals are text beside the chart.
  • The band tooltip appears on hover only.
  • Reduced motion: bands appear at once without growing in, no particles stream and drawing stops.

Theming

The element reads your shadcn theme tokens through its shadow root, so light and dark follow your theme. The accent comes from --lumesec. See Theming.

This component reads --border, --foreground, --lumesec, --muted and --muted-foreground.

To restyle only LumeSec elements, set the matching --ui-* overrides: --ui-accent, --ui-border, --ui-fg, --ui-muted and --ui-raised.

Notes

  • Data is built in: three sources, three models and 100k requests in total. It cannot be configured.
  • The chart is 220px tall and fills the width between the two label columns.

Was this page helpful?