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
Contact information card with avatar, details, and action links for call and email.
No interactive demo is registered for this component yet — the source is shown directly.
import * as React from "react"
import { MailIcon, PhoneIcon, MapPinIcon } from "@/lib/icons"
import { cn } from "@/lib/utils"
interface ContactCardProps {
name: string
email?: string
phone?: string
address?: string
avatar?: string
role?: string
className?: string
}
function ContactCard({ loading = false, name, email, phone, address, avatar, role, className }: ContactCardProps) {
if (loading) return (<div data-slot="contact-card" data-portal="https://design.nyuchi.com/components/contact-card" data-loading className="animate-pulse rounded-[var(--radius-lg,14px)] bg-card p-4 ring-1 ring-foreground/10 space-y-3"><div className="h-4 w-2/3 rounded bg-muted" /><div className="h-3 w-full rounded bg-muted" /><div className="h-3 w-1/2 rounded bg-muted" /></div>)
return (
<div
data-slot="contact-card"
className={cn(
"flex flex-col gap-4 rounded-[var(--radius-lg,14px)] bg-card p-6 text-sm text-card-foreground ring-1 ring-foreground/10",
className
)}
>
<div className="flex items-center gap-3">
{avatar ? (
<img src={avatar} alt={name} className="size-12 rounded-full object-cover" />
) : (
<div className="flex size-12 items-center justify-center rounded-full bg-muted text-lg font-medium text-muted-foreground">
{name.charAt(0).toUpperCase()}
</div>
)}
<div className="flex flex-col">
<span className="text-base font-medium">{name}</span>
{role && <span className="text-xs text-muted-foreground">{role}</span>}
</div>
</div>
<div className="flex flex-col gap-2">
{email && (
<a
href={`mailto:${email}`}
className="inline-flex items-center gap-2 text-sm text-muted-foreground transition-colors hover:text-foreground"
>
<MailIcon className="size-4 shrink-0" />
{email}
</a>
)}
{phone && (
<a
href={`tel:${phone}`}
className="inline-flex items-center gap-2 text-sm text-muted-foreground transition-colors hover:text-foreground"
>
<PhoneIcon className="size-4 shrink-0" />
{phone}
</a>
)}
{address && (
<span className="inline-flex items-center gap-2 text-sm text-muted-foreground">
<MapPinIcon className="size-4 shrink-0" />
{address}
</span>
)}
</div>
</div>
)
}
export { ContactCard }
export type { ContactCardProps }
The variants, sizes, and props surfaced by the registry. Each is sourced from the Supabase component_docs table.
Hit the registry API live and see the JSON the shadcn CLI consumes when it installs this component.
/api/v1/ui/contact-cardnpx shadcn@latest add https://mzizi.dev/api/v1/ui/contact-cardcomponents/ui/contact-card.tsx