Skip to content

Index Counter

Editorial index counter “03 / 12” in mono with zero padding and an optional hairline progress bar — for galleries, slides and case-study chapters.

mono-clean/ui/index-counter
Open ↗

Source

import { cn } from "@/lib/utils";

export interface IndexCounterProps {
  current: number;
  total: number;
  /** Show a thin progress line under the numbers. */
  progress?: boolean;
  label?: string;
  className?: string;
}

/** Editorial index counter “03 / 12” in mono with zero padding and an optional hairline progress bar — for galleries, slides and case-study chapters. */
export function IndexCounter({ current, total, progress = true, label = "Project", className }: IndexCounterProps) {
  const pad = (n: number) => String(n).padStart(2, "0");
  return (
    <div className={cn("inline-grid w-28 gap-2", className)}>
      <p className="font-da-mono text-xs tracking-da-label uppercase">
        <span className="sr-only">
          {label} {current} of {total}
        </span>
        <span aria-hidden>
          {pad(current)} <span className="text-da-muted-fg">/ {pad(total)}</span>
        </span>
      </p>
      {progress && (
        <span aria-hidden className="h-px bg-da-border">
          <span className="block h-full bg-da-fg transition-[width] duration-(--da-duration-slow) ease-da" style={{ width: `${(current / total) * 100}%` }} />
        </span>
      )}
    </div>
  );
}

export default IndexCounter;

modules/mono-clean/ui/index-counter/index.tsx

Props

PropTypeDefaultDescription
current*number—Current.
total*number—Total.
progressboolean—Show a thin progress line under the numbers.
labelstring—Label.
classNamestring—Extra classes on the root.

Other badge variants in Mono Clean

Badge in other art directions

Badge

Mono uppercase label with ink stroke in 8 solid variants (status + brand colors), two sizes, optional square status dot and a tilted sticker mode.

BrutalistBadge

Counter Badge

Notification counter that wraps any element (icon button, avatar) and pins a ruled square count to its corner; caps at max+, dot mode, three tones, hidden at zero.

BrutalistBadge

Sticker Badge

Round SVG sticker badge: dashed scalloped edge, text running around a circular path, big center label, hard offset drop shadow and a slight tilt. Four solid tones, any size.

BrutalistBadge

Tag List

Editable tag field: color-cycling ruled chips with remove buttons inside a boxed input, Enter/comma to add, Backspace to remove last, quick-add suggestion chips and a max limit.

BrutalistBadge

Avatar Stack

Overlapping gradient initials avatars inside a glass pill with a dark “+N” overflow bubble and a count label; avatars lift on hover.

GlassBadge

Badge

Pill badge in frosted glass, gradient or tinted status variants (primary, success, warning, danger) with optional dot, glowing live dot and leading icon. Two sizes.

GlassBadge

Presence Avatar

Gradient initials avatar with a presence dot (online, busy, away, offline); the “speaking” state adds a spinning conic gradient ring. Three sizes.

GlassBadge

Reaction Chip

Slack-style emoji reaction chips in glass: click to add/remove your reaction, the count pops, and reacted chips get a primary ring and tint.

GlassBadge

Badge

Small tinted label (neutral, accent, success, warning, danger, outline) with optional status dot, live pulse, pill shape and mono mode for IDs and service names.

MinimalBadge

Kbd Hint

Keyboard shortcut hint made of raised keycaps: combos (⌘ K), sequences (G then I) and an optional action label. Symbols get spoken names for screen readers.

MinimalBadge

Severity Badge

Incident severity badge: four signal bars filled according to level (SEV1–SEV4) with a mono code and optional label, so color is never the only cue.

MinimalBadge

Status Badge

Service status pill (operational, degraded, major outage, maintenance, no data) with a colored dot that pulses during incidents; soft, outline and dot-only variants.

MinimalBadge

Badge

Compact 4px-radius label in six tones × three variants (soft, outline, solid), two sizes, optional leading icon.

Neo CorporateBadge

Delta Badge

KPI delta chip: arrow + signed percentage, green when the change is favourable and red otherwise (`invert` for metrics where down is good), optional “vs last month”.

Neo CorporateBadge

Filter Chips

Active-filter bar: “field: value” chips with a remove (×) button each, a result-count region and “Clear all”; announces removals.

Neo CorporateBadge

Status Badge

Invoice/payment lifecycle status pill with a colored dot: draft, sent, viewed, paid, partial, overdue, void.

Neo CorporateBadge

Badge

Soft rounded pill label in natural tints (sage, clay, sand, forest, sun, berry), two sizes, optional leading icon.

Organic SoftBadge

Impact Badge

Impact/effort rating shown as three leaves (filled up to the level) with a text label — used on reduction actions.

Organic SoftBadge

Scope Badge

GHG scope indicator: a leaf-shaped chip with the scope number (forest / sage / clay) and an optional label; title explains the scope.

Organic SoftBadge

Status Pill

Target/action progress pill with a soft pulsing dot for active states (on track, at risk, off track) and static ones (done, not started).

Organic SoftBadge

Badge

Rounded pastel pill badge in seven tones (peach, mint, lavender, butter, neutral, primary, danger) and two sizes, with optional emoji/icon or dot.

Soft FlatBadge

Label Tags

Editable label set: pastel tags (rotating colors) with round × buttons and a dashed “+ Add label” pill that becomes an inline input (Enter adds, Escape cancels).

Soft FlatBadge

Status Dot

Task status indicator: colored dot in a soft halo plus label (To do, In progress (pulsing), In review, Done, Blocked); compact dot-only mode keeps a hidden label.

Soft FlatBadge

Streak Badge

Gamified streak badge: flame + “12-day streak” on a butter pill and seven round weekday dots, peach with a check on active days.

Soft FlatBadge