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
Transit stop card showing stop name, arriving vehicles with ETAs, and distance from user. Maps to transport.transit_stop (bus stops, train stations, kombi ranks, taxi ranks). Used in Transport stop detail and nearby-stops views.
No interactive demo is registered for this component yet — the source is shown directly.
import * as React from "react"
import { cn } from "@/lib/utils"
interface ArrivingVehicle {
routeName: string
destination: string
eta: string
mode: "bus" | "kombi" | "train"
}
interface StopCardProps extends React.ComponentProps<"div"> {
name: string
type?: "bus_stop" | "train_station" | "kombi_rank" | "taxi_rank"
distance?: string
arriving?: ArrivingVehicle[]
}
const typeLabels: Record<string, string> = {
bus_stop: "Bus Stop", train_station: "Station", kombi_rank: "Kombi Rank", taxi_rank: "Taxi Rank",
}
function StopCard({ name, type = "bus_stop", distance, arriving = [], loading = false, className, ...props }: StopCardProps) {
return (
<div
data-slot="stop-card" data-portal="https://design.nyuchi.com/components/stop-card" role="article"
className={cn("rounded-[var(--radius-lg,14px)] border border-border bg-card p-4", className)}
{...props}
>
<div className="flex items-start justify-between gap-2">
<div>
<div className="text-sm font-medium">{name}</div>
<div className="text-xs text-muted-foreground">{typeLabels[type]}</div>
</div>
{distance && (
<span className="rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground">
{distance}
</span>
)}
</div>
{arriving.length > 0 && (
<div className="mt-3 space-y-2">
{arriving.map((v, i) => (
<div key={i} className="flex items-center justify-between text-xs">
<div className="flex items-center gap-2">
<span className="font-medium">{v.routeName}</span>
<span className="text-muted-foreground">→ {v.destination}</span>
</div>
<span className="font-medium text-[var(--color-malachite,#64FFDA)]">{v.eta}</span>
</div>
))}
</div>
)}
</div>
)
}
export { StopCard }
export type { StopCardProps }
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/stop-cardnpx shadcn@latest add https://mzizi.dev/api/v1/ui/stop-card