tigran tumasov

Relative Time Card

Component 10

About

Popover to show a given date in local time.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Relative Time Card to your project and fits it to your theme.

Code

How Relative Time Card is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import React from "react";
import { RelativeTimeCard } from "@/components/ui/relative-time-card";
import { Button } from "@/components/ui/button";

export const Demo = () => (
    <div className="flex flex-col gap-2">
        <div className="font-bold text-xl dark:text-white">Default</div>
        <RelativeTimeCard date={new Date().getTime()} side="top">
            <Button>Hover Me</Button>
        </RelativeTimeCard>
    </div>
);

More by tigran tumasov

View all
  • Product Hunt Badge

    Product Hunt Badge

    1.8K
  • Book

    Book

    161
  • Calendar

    Calendar

    151
  • Theme Switcher

    Theme Switcher

    135
  • Snippet

    Snippet

    124
  • Table

    Table

    123
  • Feedback

    Feedback

    88
  • Toggle

    Toggle

    88