A retro-style mechanical flip clock with real-time and countdown modes.
npx shadcn-vue@latest add https://raya-ui.com/registry/flip-clock.jsonOr manually:
npm install clsx tailwind-merge class-variance-authority Use the countdown prop with a targetDate.
Supports multiple sizes (sm, md, lg, xl) and standard theme variants.
| Prop | Type | Default | Description |
|---|---|---|---|
| countdown | boolean | false | If true, counts down to targetDate. Otherwise shows current time. |
| targetDate | Date | string | - | Required if countdown is true. |
| size | 'sm' | 'md' | 'lg' | 'xl' | 'md' | The size of the clock digits. |
| variant | string | 'default' | Color theme variant (default, secondary, destructive, outline, muted). |
| showDays | 'auto' | 'always' | 'never' | 'auto' | Controls visibility of the days section in countdown mode. |