Content
- If you label it, say what it shows: “You and 12 people you know”.
You in the middle, the people you know around you, a line to each.
import { … } from "@brdgapp/ui/components/network-graph"NetworkGraph is the picture of a network: you (or someone) in the middle, the people you know around you, and a line to each. Up to six sit close and up to ten more sit further out, hanging off whoever they know. A blue line marks a path, like an intro that's been found. The usual mistake is treating it as a tool: it's a picture, and exploring a network belongs in a list or table.
The look comes from props
A component's appearance comes only from its own options (variant, size, color). className on a package component is for layout (mt-4, shrink-0, w-full), never for font size, color, padding, radius or hover. If the look needs a className, the component or the chosen option is wrong: fix that instead.
Middle. “You” on a blue circle, or a person's Avatar.
Close ring. Up to 6 people, each with a dashed line to the middle.
Outer ring. Up to 10 more, smaller, each with a line to the close-in person nearest them.
Path. Highlighted people: a solid blue line and a blue ring round their face.
Six close, the rest further out. The blue line is a path: someone who can introduce you.
Small, above the words that say what happened. Hidden from screen readers, since the title says it.
Your calendar is connected
We found 9 people you've met. Their intros are ready.
Pass `center` to put a person in the middle.
| State | What happens |
|---|---|
| Coming in | With animate (the default), lines and faces appear one after another once, about 60ms apart. |
| Still | After that, nothing moves. Under reduced motion it starts still. |
sm, md, lg), square, and narrower on a small screen.src; without one, the person's initials.Do
Use real names and photos when it's the person's own network.Don't
Put real people in marketing pictures. Use the sample network.Do
Highlight one or two people: the path that matters.Don't
Highlight everyone; then nothing stands out.label, because the words beside it usually say it.label, it's one image with that name; the faces inside aren't read one by one.NetworkGraph
The network picture.
| Prop | Type | Default | Description |
|---|---|---|---|
people | { name: string; src?: string }[] | — | The people around the middle, closest first. |
center | { name: string; src?: string } | — | Who's in the middle. Leave it off for “You”. |
highlight | string[] | — | Names whose line shows in blue. |
size | "sm" | "md" | "lg" | "md" | Up to 200, 280 or 360px wide. |
animate | boolean | true | Come in face by face, once. |
label | string | — | What screen readers hear. Leave it off when the words beside it say it. |
className | string | — | Layout only. |
What it's built from and where it's used, read from the code. When you change it, check these too.