Vibary.ai
← Vibe Coding

Credit Deduct Tick

A usage balance ticks down to its new figure while the amount taken rises beside it and leaves.

feedbackminimalpremiumautomatic · finite · intermediate · ~1.3s
Variant

The animated component in this preview is rendered from the canonical file shown here. The surrounding demo shell only provides context and is not part of the copied code.

366 lines · react + motion only
import { useEffect, useRef, useState } from "react";
import { AnimatePresence, motion, useReducedMotion } from "motion/react";

/**
 * Vibary · Credit Deduct Tick
 *
 * A usage balance paying for what just ran. The figure ticks down
 * through a few intermediate values so the movement is legible as a

About this pattern

The receipt for something that just ran on metered usage. The balance passes through a few intermediate figures rather than cutting straight to the answer, because a subtraction you can watch is a subtraction you believe; changed digit columns roll downward, in the direction the balance moved, and the type holds one size the whole way. The amount taken is treated as a passing remark — it rises beside the figure, fades, and is gone — so the balance ends up as the only thing on screen still saying what happened. The remaining-quota bar shortens by exactly the same amount, so the two readings can never tell different stories.

Metered AI usageAPI credit balancePrepaid walletQuota after an action

Where it shows up

Screens we drew to show where this motion usually sits. Illustrations, not captures of any product.

  • Summarise the supplier contract and flag anything unusual.
    The renewal runs another twelve months at the same rate, with one clause worth a second look.
    Supplier contract.docxQ3 planning notes
    Ask a follow-up
    AI assistant

    A usage balance updates after a run, with the charge itemised beside it.

Related patterns