Skip to main content
Clever Ops

Ledger Fill

A mono working readout, "reconciling 047/128" with tabular digits rolling in a masked slot above a hairline progress rule. Determinate via a progress prop, or indeterminate by default.

Preview & code

Loading Ledger Fill preview

Installation

pnpm dlx shadcn@latest add @cleverui/loader-ledger-fill

Requires the @cleverui registry in your components.json, a one-off, two-line setup.

Usage

tsx
import { LoaderLedgerFill } from '@/components/ui/loader-ledger-fill'
Exampletsx
'use client'

import { useEffect, useState } from 'react'
import { useReducedMotion } from 'motion/react'
import { LoaderLedgerFill } from '@/components/ui/loader-ledger-fill'

export default function LoaderLedgerFillDemo() {
  const reduced = useReducedMotion()
  const [progress, setProgress] = useState(0.18)

  useEffect(() => {
    if (reduced) {
      // hold a static mid value, no progress animation under reduced motion
      setProgress(0.62)
      return
    }
    const start = performance.now()
    let raf = 0
    const tick = (now: number) => {
      const t = Math.min(1, (now - start) / 5200)
      // ease toward completion without overshooting
      setProgress(0.18 + t * 0.74)
      if (t < 1) raf = requestAnimationFrame(tick)
    }
    raf = requestAnimationFrame(tick)
    return () => cancelAnimationFrame(raf)
  }, [reduced])

  return (
    <div className="mx-auto flex min-h-[360px] max-w-lg flex-col items-center justify-center gap-12 px-6 py-20">
      <div className="w-full max-w-sm space-y-8">
        <div className="space-y-3">
          <p className="text-muted-foreground font-mono text-[11px] uppercase tracking-[0.2em]">
            Determinate
          </p>
          <LoaderLedgerFill label="matching" progress={progress} total={256} />
          <p className="text-muted-foreground text-sm leading-relaxed">
            Pairing bank feed lines against the Apex Holdings control account.
          </p>
        </div>

        <div className="bg-border/60 h-px w-full" />

        <div className="space-y-3">
          <p className="text-muted-foreground font-mono text-[11px] uppercase tracking-[0.2em]">
            Indeterminate
          </p>
          <LoaderLedgerFill label="indexing" total={96} />
          <p className="text-muted-foreground text-sm leading-relaxed">
            Building the searchable trial balance for the March close pack.
          </p>
        </div>
      </div>
    </div>
  )
}

API reference

LoaderLedgerFill accepts the following props.

PropTypeDefaultDescription
labelstring'reconciling'mono verb before the count
progressnumberdeterminate 0 to 1; omit for indeterminate cycling
totalnumber128count denominator; current = round(progress * total)

…plus everything from React.HTMLAttributes<HTMLDivElement>: className, event handlers, aria attributes and the rest pass straight through.

Frequently asked questions

How do I install the Ledger Fill component?

Register the @cleverui registry in your components.json ("@cleverui": "https://cleverops.com.au/r/{name}.json"), then run `npx shadcn@latest add @cleverui/loader-ledger-fill`. The shadcn CLI copies the source into your project, you own the code from that point. You can also copy the source directly from this page.

What dependencies does Ledger Fill require?

Ledger Fill uses motion on top of React and Tailwind CSS. You don't need to install it manually, the shadcn CLI resolves and installs npm dependencies automatically when you add the component.

Can I theme Ledger Fill to match my brand?

Yes. The component is styled entirely with Tailwind utilities over standard design tokens (primary, background, muted, border), so it inherits your existing shadcn/ui theme automatically. Change your CSS variables and the component follows, no source edits needed for palette, radius, or fonts.

Want this built for you?

CleverUI is built by the Clever Ops web team. If you'd rather ship a hand-coded, fast, custom website than assemble one, we build them for Australian businesses every week.

Explore web development services