Cost of drift calculator

Estimates what drift costs a team per year from five inputs, each default cited, and shows the formula; it runs in the browser and sends nothing.

Organism · beta · v1.0.0 · owner: Site system lead · contract 19 of 20 points (open: figma)

Do and don't

Do: Defaults

Rendered by cost-calculator.ts

Open example: Cost of drift calculator · Do: Defaults Use the full-page example to follow page links.

Cited defaults.

Do: With sources

Rendered by cost-calculator.ts

Open example: Cost of drift calculator · Do: With sources Use the full-page example to follow page links.

Every default links to its source.

Don't: A savings promise

Rendered by cost-calculator.ts

Open example: Cost of drift calculator · Don't: A savings promise Use the full-page example to follow page links.

Not a claim by Loom.

Don't: Uncited defaults

Rendered by cost-calculator.ts

Open example: Cost of drift calculator · Don't: Uncited defaults Use the full-page example to follow page links.

Every default has a source.

Rules

RuleWhyCheck
Cost of drift calculator is computed by Loom's code from the formula (D + E) × r × W × C with cited defaults (scripts/site/roi/inputs), not drawn by hand.A showcase is proof only if the product's own code produced what it shows.Automated: scripts/site/interactives/check.ts (recomputes the showcase data and fails on drift)
Every default shows its source link.An estimate is only as good as its inputs.Automated: tests/unit/site-roi.test.ts

API

No props.

Contract details

The full contract: identity, anatomy, variants, states, tokens, layout, motion, accessibility, content, tests

Identity

AspectValue
Idcost-calculator
LayerOrganisms
Categoryshowcase
OwnerSite system lead
Statusbeta
Version1.0.0
Sourceapps/showcase/site/system/organisms/cost-calculator.ts (private repository; the contract and the render function are this one module)
VersionDateChange
1.0.02026-10-26Cost of drift calculator: computed by Loom's code from the formula (D + E) × r × W × C with cited defaults (scripts/site/roi/inputs).

Use when

  • The cost-of-drift article and the CEO role page. Why: A number the reader computes is more convincing than one we state.

Do not use when

  • As a promise of savings. Why: It is an estimate from the reader's inputs, not a claim by Loom; it says so.

Anatomy

PartWhat it is
formdiv.roi-form: roi-field inputs with units and hints
formulap.roi-formula
resultsdiv.roi-results
notep.roi-note: not a claim by Loom, sources linked

Made of: showcase-frame, form-field, caption.

Used in: pages directly.

Variants

VariantWhenWhy
fullOn its demo page and its section.The whole experience where the claim is made.

States

StateRendered or not applicable
defaultCited defaults and their result.
hoverInputs show hover.
focus-visible--focus on every input.
activeNot applicable: Inputs, no pressed state.
disabledNot applicable: Nothing disabled.
loadingNot applicable: Calculation runs synchronously from input. The no-JavaScript worked example is a static fallback, not a pending calculation.
emptyAn empty or nonfinite input uses the cited default in calculation; static hints/sources remain visible.
errorFinite out-of-range readings are bounded by the calculation model. Native min/max attributes and static hints remain; no dynamic error text or aria-invalid update is implemented.
currentNot applicable: No steps.
visitedNot applicable: Not a link.
expandedNot applicable: Does not open.

Tokens

PartToken
result.font--type-h2 (figures)
field.border--line-strong
--cost-calculator-gap-space-8var(--space-8)
--cost-calculator-margin-block-space-9var(--space-9)
--cost-calculator-top-header-hvar(--header-h)
--cost-calculator-top-space-6var(--space-6)
--cost-calculator-gap-space-7var(--space-7)
--cost-calculator-padding-space-6var(--space-6)
--cost-calculator-border-linevar(--line)
--cost-calculator-border-radius-radiusvar(--radius)
--cost-calculator-background-surfacevar(--surface)
--cost-calculator-padding-space-3var(--space-3)
--cost-calculator-font-type-strongvar(--type-strong)
--cost-calculator-color-inkvar(--ink)
--cost-calculator-gap-space-3var(--space-3)
--cost-calculator-padding-block-space-5var(--space-5)
--cost-calculator-border-top-linevar(--line)
--cost-calculator-font-type-labelvar(--type-label)
--cost-calculator-color-ink-2var(--ink-2)
--cost-calculator-padding-space-4var(--space-4)
--cost-calculator-padding-space-5var(--space-5)
--cost-calculator-font-type-figurevar(--type-figure)
--cost-calculator-background-cottonvar(--cotton)
--cost-calculator-border-ink-2var(--ink-2)
--cost-calculator-outline-focusvar(--focus)
--cost-calculator-border-color-inkvar(--ink)
--cost-calculator-border-color-madder-inkvar(--madder-ink)
--cost-calculator-font-size-fs-smallvar(--fs-small)
--cost-calculator-padding-space-7var(--space-7)
--cost-calculator-border-inkvar(--ink)
--cost-calculator-margin-space-5var(--space-5)
--cost-calculator-font-type-h3var(--type-h3)
--cost-calculator-letter-spacing-ls-h3var(--ls-h3)
--cost-calculator-gap-space-1var(--space-1)
--cost-calculator-font-size-fs-h3var(--fs-h3)
--cost-calculator-color-indigo-inkvar(--indigo-ink)
--cost-calculator-background-surface-2var(--surface-2)
--cost-calculator-padding-space-1var(--space-1)
--cost-calculator-margin-top-space-5var(--space-5)
--cost-calculator-margin-space-4var(--space-4)
--cost-calculator-padding-left-space-7var(--space-7)
--cost-calculator-gap-space-2var(--space-2)

Layout

AspectValue
breakpointsRequired review at 390, 768, 1024 and 1440 px; execution is not implied by this declaration; columns stack under 768 px and controls fill the row on phones.
wrappingText wraps; code panes scroll inside their own focusable region.
textExpansionJapanese strings come from the i18n tables and wrap; engine output stays English.

Spacing and rhythm

AspectValue
internalInside the Showcase frame's padding, controls and caption at its foot.
externalFull width of its section.
rhythmOne showcase per section, after the section's claim (D-SITE-008).

Motion

AspectValue
NoneThe result updates instantly; numbers do not animate.

Runtime and reuse

  1. Render-only element; mount any registered child enhancements separately. Preserve required Site CSS, fonts, responsive and locale rules from nativeElement.

Accessibility passport

AspectValue
roleregion with a heading, or a figure
nameIts heading or caption
keyboardTab through number inputs; typing recomputes results synchronously. The containing element prevents form submission.
focusTyping retains focus on the number input; updating results does not move it.
screenReaderLabels/units/static hints are associated with inputs; the two headline results are announced after the existing800ms typing pause, not as async calculation loading.
contrastInk on surface 14:1; state dyes only as marks with words.
targetControls are 44 px.

Content

SlotLengthVoice
note2 sentencesAn estimate, not a claim

Good: “Your inputs, our formula. Not a claim by Loom.”

Bad: “Save $1M”

Japanese: English only (the article is English).

Icons and illustrations

None: this element uses no icon or illustration of its own.

Decisions and exceptions

Usage

110 uses across the built pages (measured by npm run site:system).

Tests

AspectValue
unittests/unit/site-system.test.ts: renders every do and don't example through the registry and checks the classes it owns
visualNot yet: there are no screenshot baselines; the Library page is checked for sideways scroll at 1440 px by tests/site/system.spec.ts
a11ytests/site/system.spec.ts: axe (0 serious or critical) on the element's Library page in light and dark
parityscripts/site/system/check.ts: Library examples are rendered by the same render function the site imports

Figma

not-yet: The Loom Site Figma library is the last stage of the plan; this element is not mapped yet.

Open in Storybook

Start with a conversation about your system.

We read your system, show you what we found, and agree with your team what to fix first.