Mara Okonkwo
Product designer
- 0
- Followers
- 0
- Following
- 0
- Shots
Grainy mesh banner that drifts with the pointer, rolling stats and a Follow button that morphs. Following is optimistic: it updates at once and rolls back if your request fails. Cards.
Open playgroundProduct designer
ProfileCard is a React component in the Cards category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { ProfileCard } from "@ashutoshswamy/smoui" and set name, avatar, palette among its 8 props.
npm i @ashutoshswamy/smouiimport { ProfileCard } from "@ashutoshswamy/smoui";
<ProfileCard
name="Mara Okonkwo"
role="Product designer"
stats={[{ label: "Followers", value: 2480 }, { label: "Shots", value: 87 }]}
onFollow={(on) => console.log(on)}
/>
// <ProfileCard variant="compact" name="..." role="..." />Text content.
stringPhoto URL. Without one, a mesh avatar is generated from the name.
string0-7, picks the mesh colors. Defaults to a hash of the name.
numberCounted stats. A stat labelled Followers ticks up when you follow.
{ label: string; value: number }[]Compact is a single row.
"banner""compact"default "banner"Banner image URL. Without one, the grainy mesh is used.
stringControlled or initial follow state.
booleanReturn a promise to get optimistic updates: the card shows the new state now and rolls back if it rejects.
(on: boolean) => void | Promise<unknown>