Match Card Compact
mrdoge-ui/match-card-compactFreeComponent
Minimal match row: overlapping crests plus a label, no score/status/odds.
Install it
npx shadcn@latest add https://mrdoge.co/r/match-card-compact.jsonSource
1import { cn } from "@/lib/utils"2import { EntityImage } from "@/registry/mrdoge-ui/entity-image/entity-image"34export interface MatchCardCompactTeam {5 name: string6 logoUrl?: string7}89export interface MatchCardCompactProps {10 home: MatchCardCompactTeam11 away: MatchCardCompactTeam12 /** Shown next to the crests. Defaults to "home vs away". */13 label?: string14 /**15 * Shown right-aligned, e.g. a score. Takes priority over `kickoff` when16 * both are set, so a live score can override the date once one exists.17 */18 info?: string19 /** Formatted and shown right-aligned when `info` isn't set, e.g. "Aug 9". No time-of-day or "today" special-casing — this is a compact identifier row, not the primary place a match's kickoff lives (that's Match Card / Match Highlight's job). */20 kickoff?: Date | string21 className?: string22}2324function formatKickoff(kickoff: Date | string) {25 const date = typeof kickoff === "string" ? new Date(kickoff) : kickoff26 return date.toLocaleDateString(undefined, { month: "short", day: "numeric" })27}2829/**30 * A minimal match row: overlapping crests plus a label, no31 * score/status/odds. Deliberately lighter than Match Card, for contexts32 * that just need to identify a match at a glance: a dropdown item, a33 * group header. See Bet Slip's `BetSlipMatchGroup` and Match Highlight's34 * competition dropdown.35 */36export function MatchCardCompact({ home, away, label, info, kickoff, className }: MatchCardCompactProps) {37 const trailing = info ?? (kickoff ? formatKickoff(kickoff) : undefined)38 return (39 <div className={cn("flex items-center gap-2", className)}>40 <div className="flex shrink-0 gap-2">41 <EntityImage src={home.logoUrl} name={home.name} size="sm" />42 <EntityImage src={away.logoUrl} name={away.name} size="sm" />43 </div>44 <span className="min-w-0 flex-1 truncate text-sm font-medium">{label ?? `${home.name} vs ${away.name}`}</span>45 {trailing ? <span className="shrink-0 text-xs tabular-nums text-muted-foreground">{trailing}</span> : null}46 </div>47 )48}
What it pulls in
Other registry items
Files it writes
More from mrdoge-ui
All 26 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Bet Slipbet-slip | mrdoge-ui | Components | Free | no deps | |
| Entity Imageentity-image | mrdoge-ui | Components | Free | no deps | |
| Match Cardmatch-card | mrdoge-ui | Components | Free | no deps · 3 files | |
| Match Highlightmatch-highlight | mrdoge-ui | Components | Free | no deps · 2 files | |
| Match Timelinematch-timeline | mrdoge-ui | Components | Free | no deps | |
| Odds Selectorodds-selector | mrdoge-ui | Components | Free | no deps · 2 files | |
| Stats Liststats-list | mrdoge-ui | Components | Free | no deps |
