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
Live/static location sharing card in chat. Shows a mini map preview with pin, address, and share duration (for live). Used in Campfire for meeting coordination, Transport for pickup points, and Places for recommendations.
View the full component source code below.
import * as React from "react"
import { cn } from "@/lib/utils"
interface LocationShareProps extends React.ComponentProps<"div"> {
latitude: number
longitude: number
address?: string
label?: string
isLive?: boolean
liveDuration?: string
onOpen?: () => void
}
function LocationShare({
latitude, longitude, address, label, isLive = false, liveDuration, onOpen, loading = false, className, ...props
}: LocationShareProps) {
return (
<div
data-slot="location-share" data-portal="https://design.nyuchi.com/components/location-share"
className={cn(
"overflow-hidden rounded-[var(--radius-lg,14px)] border border-border bg-card",
onOpen && "cursor-pointer",
className
)}
onClick={onOpen}
role={onOpen ? "button" : undefined}
tabIndex={onOpen ? 0 : undefined}
{...props}
>
{/* Map preview placeholder */}
<div className="relative h-32 bg-muted">
<div className="flex size-full items-center justify-center text-xs text-muted-foreground">
<div className="flex flex-col items-center gap-1">
<div className="size-4 rounded-full bg-[var(--color-malachite,#64FFDA)]" />
<span className="font-mono text-[9px]">{latitude.toFixed(4)}, {longitude.toFixed(4)}</span>
</div>
</div>
{isLive && (
<div className="absolute top-2 left-2 flex items-center gap-1 rounded-full bg-[var(--color-malachite,#64FFDA)]/20 px-2 py-0.5">
<div className="size-1.5 animate-pulse rounded-full bg-[var(--color-malachite,#64FFDA)]" />
<span className="text-[9px] font-medium text-[var(--color-malachite,#64FFDA)]">Live{liveDuration ? ` · ${liveDuration}` : ""}</span>
</div>
)}
</div>
<div className="p-3">
{label && <div className="text-sm font-medium">{label}</div>}
{address && <div className="text-xs text-muted-foreground truncate">{address}</div>}
</div>
</div>
)
}
export { LocationShare }
export type { LocationShareProps }
npx shadcn@latest add https://mzizi.dev/api/v1/ui/location-shareFetch this component's metadata and source code from the registry API.
/api/v1/ui/location-share