A shadcn-style relative time formatting utility built with Ark UI primitives.

Updated45 minutes ago
Trial endsin 2 days

Installation

npx shadcn@latest add @ark-cn/format

Usage

import { FormatRelativeTime } from "@/components/ui/format"

Examples

Default

Updated45 minutes ago
Trial endsin 3 days

API reference

This utility mirrors Ark UI's relative time formatter. The ark-cn file exports it both as FormatRelativeTime and as Format.RelativeTime.

See the ARK UI documentation for the full API.