Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Desktop Window
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Frame
- Heading
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Live Waveform
- Marker
- Menubar
- Message
- Message Scroller
- Meter
- Meter Ring
- Native Select
- Navigation Menu
- NumberCount
- Pagination
- Popover
- Progress
- Progress Ring
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Timeline
- Toast
- Toggle
- Toggle Group
- Tooltip
Compositions
Utilities
Building a notification counter? NumberBadge
wraps NumberCount in a self-anchoring badge with 99+ overflow.
"use client"
import * as React from "react"Installation#
bunx --bun shadcn@latest add @ondo-ui/number-count
This installs NumberCount along with its @number-flow/react dependency.
Usage#
import { NumberCount } from "@/components/ui/number-count"<NumberCount value={1234} />Examples#
Formatting#
NumberCount forwards NumberFlow's format prop (Intl.NumberFormat options),
so compact notation, currency, and percent all work out of the box.
"use client"
import * as React from "react"API reference#
NumberCount accepts every NumberFlow prop
(it spreads ...props onto the underlying element). The most common:
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | — | Required. The number to display; changes animate. |
format | Intl.NumberFormatOptions | — | e.g. { notation: "compact" }, currency, percent. |
prefix | string | — | Rendered before the number. |
suffix | string | — | Rendered after the number. |
className | string | — | Merged onto the NumberFlow host (after tabular-nums). |
Built on#
NumberCount is a thin wrapper over NumberFlow
from @number-flow/react, adding ondo's tabular-nums default. Need the raw
component? Use NumberFlow directly.
Looking for a ready-made count badge? See
NumberBadge.