Relative time popover with timezone details
For AI Agents
Hand your agent this brief or the ReUI MCP, not a screenshot. Free to install.
Best for: A relative time inside a sentence, behind a dashed underline, that opens exact dates and clock times updating each second
When to use
- Quick edits and settings opened from a button, such as layer dimensions, switches or a volume slider
- Previews opened by a click, such as a person's bio card, a template image with actions or an AI feature pitch
- Inline details and short guides, such as exact times behind a relative date or a stepped feature tour
When not to use
- Exact deploy times revealed while the pointer rests on the label: use the Hover Card component
- A field where the user picks an hour and minute rather than reads them: use the Time Picker component
- A full account page that edits a person's name, avatar, email, team and billing: use the Profile blocks
- A full page of record fields, such as an invoice or a product, ending in a submit row: use the Form blocks
- A task that must block the page and hold focus until the user answers: use the Dialog component
Agent notes
referenceTimeis always 2 hours beforenow, so pass your real deploy timestamp in its place- The row badged UTC goes through date-fns
format, which prints local time; convert it before showing it as UTC nowreads the clock inuseStateduring render, so a server rendered page hydrates with other seconds; set it after mount- Compose
PopoverTriggerthroughrenderon the base twin andasChildon the radix twin, as every example does; the other twin's prop does not compose PopoverContentis w-72 in both twins whatever it holds; size it with a width class such asw-autoorw-64- The base
PopoverTitlenames the popup for screen readers; the radix one is a plain div, so give radixPopoverContentanaria-label
Third-party API docs
- date-fns v4: docs
https://reui.io/components/popover/c-popover-9.mdget_example("c-popover-9")npx shadcn@latest add @reui/c-popover-9About Shadcn Popover Relative Time
Relative time popover with timezone details. Built by composing Badge, Popover. Uses date-fns alongside the shadcn primitives. A free, open source shadcn popover example you can install with npx shadcn@latest add @reui/c-popover-9 and edit as your own code.
What You Can Build With Shadcn Popover Relative Time
- Composes Badge, Popover, so it drops into any project already using those components.
- Install it with the shadcn CLI: npx shadcn@latest add @reui/c-popover-9
- Open source and free, with the full source on this page to copy or adapt.
More Shadcn Popover Examples
- Basic Basic popover.
- Opening Sides Popovers opening from different sides.
- Inline Form Popover with form.
- Alignment Popover alignment positions.
- In Dialog Popover within a dialog.
- Profile Card Popover with user profile details.
- Feature Pitch Popover with custom content
- Media Preview Popover with media preview.
- Controls Popover with controls
- Step Tour Popover with navigation
Related Shadcn Component Categories
Open-source shadcn progress components for upload progress, goal tracking, and setup steps.
Open-source shadcn questionnaire components for onboarding surveys, multi-step question flows, and guided feedback.
Open-source shadcn radio group components for single-choice forms, plan selection, and settings preferences.
Open-source shadcn rating components for product reviews, feedback forms, and satisfaction scores.
Open-source shadcn resizable components for split panes, workspace layouts, and draggable dividers.
Open-source shadcn scroll area components for custom scroll regions, sidebar panes, and dense lists.
Frequently Asked Questions
When should I use Shadcn Popover Relative Time?
Use it for a relative time inside a sentence, behind a dashed underline, that opens exact dates and clock times updating each second.
Shadcn Popover as a whole fits:
- Quick edits and settings opened from a button, such as layer dimensions, switches or a volume slider
- Previews opened by a click, such as a person's bio card, a template image with actions or an AI feature pitch
- Inline details and short guides, such as exact times behind a relative date or a stepped feature tour
For exact deploy times revealed while the pointer rests on the label, use the Hover Card component. For a field where the user picks an hour and minute rather than reads them, use the Time Picker component. For a full account page that edits a person's name, avatar, email, team and billing, use the Profile blocks. For a full page of record fields, such as an invoice or a product, ending in a submit row, use the Form blocks. For a task that must block the page and hold focus until the user answers, use the Dialog component.
How do I install Shadcn Popover Relative Time?
Is Shadcn Popover Relative Time free to use?
Which components does Shadcn Popover Relative Time use?
Start building with ReUI Pro today.
Every Pro block, every style, and every future addition, with one license for unlimited projects.
From $249, once. Lifetime updates.