
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@buzzr/dfs-react
Advanced tools
Framework-agnostic display helpers for rendering @buzzr/dfs-engine settlements — turns DfsSettlementResult into a clean view-model for React, Vue, Svelte, or plain HTML.
Turn a raw settlement result into a render-ready view-model in one call. @buzzr/dfs-engine is headless — it hands you a DfsSettlementResult with no opinion on display. This package projects that result into pre-formatted labels, currency strings, and status tones your UI can map straight to markup — in React, Vue, Svelte, or vanilla HTML.
Despite the name, this package has zero React runtime dependency. The name signals its primary consumer audience; the code is pure TypeScript formatting functions.
npm install @buzzr/dfs-react @buzzr/dfs-engine
import { getSlipDisplayModel } from '@buzzr/dfs-react';
import type { DfsSettlementResult } from '@buzzr/dfs-engine';
function SlipCard({ result }: { result: DfsSettlementResult }) {
const model = getSlipDisplayModel(result);
// model.statusLabel -> "won"
// model.tone -> "win" (win | loss | push | pending | void)
// model.multiplierLabel -> "3.00x"
// model.payoutLabel -> "$30.00"
// model.stakeLabel -> "$10.00"
return (
<div data-tone={model.tone}>
<header>
{model.statusLabel} · {model.multiplierLabel} · {model.payoutLabel}
</header>
<ul>
{model.legs.map((leg) => (
<li key={leg.legId} data-tone={leg.tone}>
{leg.label} {leg.line}
{leg.actual !== null && <span> · actual {leg.actual}</span>}
{leg.pendingReason && <span> · {leg.pendingReason}</span>}
</li>
))}
</ul>
</div>
);
}
Each leg comes back as "Jayson Tatum — Points" (label) with an "o26.5" / "u26.5" line (line), its outcome status, a display tone, and the actual stat value if graded.
| Export | Purpose |
|---|---|
getSlipDisplayModel() | Project a DfsSettlementResult into a SlipDisplayModel |
getStatusTone() | Map an engine status string to a SlipStatusTone |
formatLegLabel() | Render "{Player} — {PropType}" |
formatLegLine() | Render "o26.5" / "u26.5" |
SlipDisplayModel | Type: slip-level labels, tone, and formatted stake/payout/multiplier |
LegDisplayModel | Type: per-leg label, line, status, tone, actual value, and pending reason |
SlipStatusTone | Type: 'win' | 'loss' | 'push' | 'pending' | 'void' |
| You want to… | Reach for |
|---|---|
| Format settlement results for any UI layer | this package |
| Produce the settlement results in the first place | @buzzr/dfs-engine |
| Grade entries from the command line | @buzzr/dfs-cli |
| Build settlement fixtures for tests | @buzzr/dfs-testkit |
MIT
FAQs
Framework-agnostic display helpers for rendering @buzzr/dfs-engine settlements — turns DfsSettlementResult into a clean view-model for React, Vue, Svelte, or plain HTML.
The npm package @buzzr/dfs-react receives a total of 16 weekly downloads. As such, @buzzr/dfs-react popularity was classified as not popular.
We found that @buzzr/dfs-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.