Ranked List Card

v0.1.2

Dense three-zone list card with a rank + confidence arc, header badges, a lifecycle pill chain, and trailing meta blocks. Fully props-driven and domain-agnostic, with an escalation ribbon, urgency/severity accents, selected state, and a loading skeleton.

View as Markdown

Install

npx shadcn@latest add @signalos/ranked-list-card

Requires a configured @signalos registry and a valid SIGNALOS_REGISTRY_TOKEN - get access. Registry dependencies (@signalos/tokens, @signalos/utils, @signalos/skeleton, @signalos/circular-progress, @signalos/status-badge) are pulled automatically.

Preview

Example & code

ranked-list-card.example.tsx
// Example: a ranked queue item mapped from arbitrary domain data.
import { ArrowUpRight, Clock, Layers, Route, Zap } from "lucide-react"

import { RankedListCard } from "@/components/widgets/ranked-list-card/RankedListCard"
import { StatusBadge } from "@/components/widgets/status-badge/StatusBadge"

export default function Example() {
  return (
    <RankedListCard
      severity="high"
      urgency="urgent"
      ribbon={{
        label: "Escalated",
        icon: <ArrowUpRight className="h-2.5 w-2.5" />,
      }}
      rank={{ value: "#2", progress: 62, progressColorClass: "text-primary" }}
      badges={
        <>
          <StatusBadge severity="high" appearance="chip" />
          <StatusBadge appearance="chip">IN PROGRESS</StatusBadge>
          <span className="flex items-center gap-1 font-mono text-[10px] text-muted-foreground">
            <Layers className="h-2.5 w-2.5" /> 16 signals
          </span>
        </>
      }
      title="Coverage collapse across multiple tenants"
      meta={
        <>
          <span>interoperability</span>
          <span className="text-muted-foreground/30">·</span>
          <code className="text-[10.5px]">coverage_rate</code>
        </>
      }
      pills={[
        { label: "Signal", icon: <Zap className="h-2.5 w-2.5" /> },
        { label: "Hyp +1h" },
        {
          label: "Routed +37s",
          icon: <Route className="h-2.5 w-2.5" />,
          emphasized: true,
        },
      ]}
      trailing={[
        {
          label: "Act by",
          value: (
            <span className="inline-flex items-center gap-1 font-mono font-semibold text-warning-500">
              <Clock className="h-3 w-3" /> 3h 12m
            </span>
          ),
        },
        { label: "Routed to", value: "Ops reviewer", detail: "admin" },
      ]}
      trailingFooter="score 0.746"
      onOpen={() => {}}
    />
  )
}

Props

RankedCardPill

PropTypeDefaultDescription
label*ReactNode-Pill text.
iconReactNode-Optional leading icon.
emphasizedboolean | undefinedfalseHighlights the pill with the primary accent.

RankedCardMetaBlock

PropTypeDefaultDescription
label*ReactNode-Uppercased caption.
value*ReactNode-Value ReactNode (string, number, or styled node).
detailReactNode-Optional secondary line under the value.

RankedCardRank

PropTypeDefaultDescription
labelReactNode"Rank"Caption above the rank number.
value*ReactNode-The rank value, e.g. `#2`.
progressnumber | undefined-Optional 0–100 arc value rendered under the rank.
progressColorClassstring | undefined-Tailwind text-* class driving the arc color.

RankedCardRibbon

PropTypeDefaultDescription
label*ReactNode-
iconReactNode-

RankedListCardProps

PropTypeDefaultDescription
severitySeverity | null | undefined-Severity driving the accent border. When `urgency` is set it takes precedence for the border tint.
urgency"none" | "past-due" | "urgent" | undefined-Urgency accent, independent of severity — e.g. proximity to a deadline. `past-due` → error border, `urgent` → warning border.
selectedboolean | undefined-Selected state (ring + primary border).
ribbonRankedCardRibbon | undefined-Optional corner ribbon.
rankRankedCardRank | undefined-Left-column rank + arc. Omit to hide the whole left column.
badgesReactNode-Header badges/chips rendered above the title (StatusBadge, etc.).
title*ReactNode-Primary title (line-clamped to 2).
metaReactNode-Sub-title meta row under the title (domain, metric, deviation…).
pillsreadonly RankedCardPill[] | undefined-Horizontal lifecycle pill chain.
trailingreadonly RankedCardMetaBlock[] | undefined-Trailing stacked meta blocks (desktop only).
trailingFooterReactNode-Small trailing footer line under the trailing blocks (e.g. a score).
mobileFooterReactNode-Content for the mobile-only footer strip.
onOpen(() => void) | undefined-Invoked on click / Enter / Space.
classNamestring | undefined-
data-testidstring | undefined-

npm dependencies

lucide-react@^1.7.0

Changelog

ranked-list-card

0.1.2

  • Resolved a merge conflict.

0.1.1

  • Format source with the repo prettier config (no behavior change).

0.1.0

  • Initial release, genericized from the attention-routing-01 block's RoutingFeedCard. The domain routing/hypothesis shapes are replaced by generic props (rank, badges, title, meta, pills, trailing, ribbon, urgency, severity), so the same three-zone card renders any ranked record. Ships a matching RankedListCardSkeleton.