Dice UI

Relative Time Card

A hover card that displays relative time relative to local time with timezone information.

API

Installation

pnpm dlx shadcn@latest add @diceui/relative-time-card

Examples

With Multiple Timezones

With Variants

API Reference

RelativeTimeCard

The main component that displays relative time with hover functionality.

Prop

Type

Data AttributeValue
[data-popup-open]

Accessibility

Keyboard Interactions

KeyDescription
TabOpens/closes the relative time card.
EnterOpens the relative time card if closed.

Credits

On this page