nyuchimzizi
Mzizi — an open-architecture project of the Bundu Foundation, operated and developed by Nyuchi. Built on the Five African Minerals palette.
Built by Nyuchi Africav4.0.39
Author profile card with avatar, bio, works count, subscriber count, revenue sharing indicator, and follow button. Maps to identity.person + novels.work tables. Used on novel detail pages and author directory.
View the full component source code below.
import * as React from "react"
import { cn } from "@/lib/utils"
interface AuthorBioCardProps extends React.ComponentProps<"div"> {
name: string
avatar?: string
bio?: string
worksCount?: number
subscriberCount?: number
revenueSharePct?: number
verified?: boolean
verificationTier?: 0 | 1 | 2 | 3 | 4
onFollow?: () => void
isFollowing?: boolean
}
function AuthorBioCard({
name, avatar, bio, worksCount, subscriberCount, revenueSharePct,
verified, verificationTier, onFollow, isFollowing, loading = false, className, ...props
}: AuthorBioCardProps) {
return (
<div
data-slot="author-bio-card" data-portal="https://design.nyuchi.com/components/author-bio-card" role="article"
className={cn("rounded-[var(--radius-lg,14px)] border border-border bg-card p-4", className)}
{...props}
>
<div className="flex items-start gap-3">
<div className="flex size-12 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-medium">
{avatar ? <img src={avatar} alt={name} className="size-full rounded-full object-cover" /> : name.charAt(0)}
</div>
<div className="min-w-0 flex-1">
<div className="flex items-center gap-1.5">
<span className="text-sm font-semibold" style={{ fontFamily: "var(--font-serif, serif)" }}>{name}</span>
{verified && <span className="text-[var(--color-gold,#FFD740)] text-xs">✓</span>}
</div>
{bio && <p className="mt-1 text-xs text-muted-foreground line-clamp-2">{bio}</p>}
<div className="mt-2 flex items-center gap-3 text-xs text-muted-foreground">
{worksCount !== undefined && <span>{worksCount} works</span>}
{subscriberCount !== undefined && <span>{subscriberCount.toLocaleString()} subscribers</span>}
{revenueSharePct !== undefined && <span className="text-[var(--color-malachite,#64FFDA)]">{revenueSharePct}% revenue share</span>}
</div>
</div>
{onFollow && (
<button
onClick={onFollow}
className={cn(
"h-8 shrink-0 rounded-full px-4 text-xs font-medium",
isFollowing
? "border border-border text-muted-foreground transition-colors hover:bg-muted"
: "bg-primary text-primary-foreground"
)}
>
{isFollowing ? "Following" : "Follow"}
</button>
)}
</div>
</div>
)
}
export { AuthorBioCard }
export type { AuthorBioCardProps }
npx shadcn@latest add https://mzizi.dev/api/v1/ui/author-bio-cardFetch this component's metadata and source code from the registry API.
/api/v1/ui/author-bio-card