Uptoolkit
GitHub

Actor Card

Profile summary card for an ActivityPub actor with Schema.org Person markup.

@mira@fediverse.example

Cartographer. I make maps of things that are hard to see.

Posts
1.2K
Followers
18.9K
Following
342
Atlas
https://maps.example/mira
Location
Bergen, Norway

Joined July 2019

@juno@hachyderm.example

Type designer, letterform historian, reluctant poster.

Installation

npx shadcn@latest add https://ui.uptoolkit.com/r/actor-card.json

Usage

Profile summary for an ActivityPub actor: identity, bio, counts, profile fields, and a follow control. Use it in follower lists, suggestion rails, and search results.

import { ActorCard } from "@/components/ui/actor-card";

<ActorCard
  actor={actor}
  viewer={viewer}
  counts={{ posts: 1204, followers: 18940, following: 342 }}
  showFields
  onMessage={(actor) => openThread(actor)}
/>

Variants

card stacks avatar, identity, and actions vertically. row is a compact list item with the follow button trailing — the right shape for a sidebar or a long list.

<ActorCard actor={actor} variant="row" />

Verification

showFields renders the actor's attachment PropertyValue rows. Fields with verifiedAt set — how Mastodon marks a confirmed rel="me" link — get a link icon and a verified accent, and the avatar picks up a check badge.

Structured data

The card emits Person or Organization microdata depending on the actor's type, including the WebFinger handle as identifier. Add includeJsonLd for a JSON-LD script; leave it off when the card is inside a list that already emits an ItemList, to avoid duplicate nodes.

Follow state is controlled or uncontrolled, forwarding to follow-button — pass hideFollow to drop the control entirely.