Components
- Accordion
- Add to Cart
- Animated List
- Carousel
- Collapsible Sidebarnew
- Dynamic Island
- Expandable Cardnew
- Expanding Searchnew
- Filter Grid
- Kanban Board
- Layout Switcher
- Morphing Popover
- Number Flip
- Page Transition
- Product Gallery
- Segmented Control
- Sortable Table
- Stack Navigator
- Status Button
- Step Wizard
- Tabs
- Text Morphnew
- Theme Mode Switch
- Theme Morph Button
- Theme Toggle Button
- Theme Toggle Switch
- Theme Transition
- Toast Stacknew
Monthly revenue
1,2871,287 paying customers
Installation
$ pnpm dlx shadcn@latest add @transition-kit/number-flipUsage
import { NumberFlip } from "@/components/transitions/number-flip";const [price, setPrice] = useState(1299);
<NumberFlip value={price} format={{ style: "currency", currency: "EUR" }} />
<button type="button" onClick={() => setPrice((p) => p + 100)}>
Add seat
</button><NumberFlip
value={2_480_000}
format={{ notation: "compact", maximumFractionDigits: 1 }}
stagger
/>API Reference
NumberFlip
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | - | Number to display. |
format | Intl.NumberFormatOptions | - | Intl.NumberFormat options used to format the number. |
locales | Intl.LocalesArgument | "en-US" | Locale used for formatting. Fixed by default so server and client render the same string; pass the user's locale to change it. |
stagger | boolean | false | Staggers the rolls of changed digits. |
className | string | - | Applied to the root <span>. Other props are spread onto it. |