Skip to content
HomeCobalt

Result count

Says how many items match a list: the exact count, an estimate, a floor while the end is not known yet, or how many of them can be shown when the server caps it, and reads each new count to a screen reader.

Examples

The count above a list follows its filter: a bar holds its place on the first load, a screen reader hears each new count, and the count dims with the rows while the next answer loads.

Loading
Approximate countA full-text search estimates how many filings match rather than counting them, so the count says about.

About 12,400 filings

  • Harbour Capital Advisors
    Form ADV, Part 2A
  • Calder & Rowe
    Form ADV, Part 2A
  • Northgate Investment
    Form ADV, Part 2B
CappedThe server matches 12,400 funds but hands out the first 500 before sign-in, so the count says so with the way to lift the cap, and the line after the last row says the list ends there, with the same way on.

Loading
Partial countA list paged by cursor knows only how many it has seen and that more follow, so the count says at least that many until the last page comes back.

At least 4 filings

  • Harbour Capital Advisors
    Form ADV
  • Calder & Rowe
    Form 13F
  • Northgate Investment
    Form PF
  • Fjord Asset Management
    Form ADV

Usage

Use it when

  • A list, a table or a search shows how many items match, above the rows, and the number changes with a filter.
  • The server counts roughly, stops counting, or hands out fewer rows than match.

Use something else when

  • One figure that matters on a page, such as total assets. Use Stat instead.
  • Which items of a paged list are on screen. Use Pagination's count line instead, which says "1 to 40 of 1,284".
  • A count inside a control, such as a filter option's count. Use FilterBar instead, which writes each option's count beside it.

Rules

General

Content

Avoid

Limits

Install

npx shadcn@latest add https://kaanarici.com/r/cobalt/result-count.json
import { ResultCount, type ResultCountLabels, type ResultCountPrecision, type ResultCountProps } from "@/components/cobalt/ui/result-count"