Count

How many records of a resource match a filter, optionally linked to the filtered list. It needs a resource, from its resource prop or the context.

Installation

pnpm dlx shadcn@latest add @chelone/count

How many records of a resource match a filter, optionally linked to the filtered list. It needs a resource, from its resource prop or the context.

Props

PropTypeDefaultDescription
classNamestring—
filterFilterPayload—
linkboolean—Link the count to the resource's list, filtered by `filter`.
resourcestring—The resource to count. Defaults to the ambient resource.
sortSortPayload—
timeoutnumber—Milliseconds a pending count waits before showing a spinner. Default 1000.