Countdown
Countdown gives you a transition effect of changing numbers. Uses the --value CSS variable (0–999) and optionally --digits to set minimum digit display.
Import
import { Countdown } from '@sigx/daisyui';
Basic Usage
Loading preview...
Large Text
Use the class prop to add Tailwind utility classes for sizing.
Loading preview...
Clock Format
Combine multiple Countdown components to create a clock display.
Loading preview...
With Labels
Display countdown values with descriptive labels underneath.
Loading preview...
Boxed Style
Wrap each countdown in a styled container for a card-like appearance.
Loading preview...
Three Digit Values
Use digits={3} to display values up to 999 with minimum 3 digits.
Loading preview...
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | 0 | The numeric value to display (0–999) |
digits | 2 | 3 | undefined | Minimum number of digits to display |
class | string | undefined | Additional CSS classes |