useFormat
Date, number, currency and relative time in the provider locale, on the platform Intl APIs.
const f = useFormat();
f.relative(message.createdAt); // "há 4 minutos"
f.currency(449, "BRL"); // "R$ 449,00"
f.date(invoice.dueAt); // "18 de out. de 2026"Installation
Once per app, set up Aedis UI. The CLI verifies the signed release before writing anything and pins every dependency:
npx @aedis/cli@0.1.0 initImport the theme once in your global CSS, after Tailwind:
app/globals.css
@import "tailwindcss";@import "./styles/aedis-theme.css";Then add the component:
npx @aedis/cli@0.1.0 add use-format# pnpm dlx @aedis/cli@0.1.0 add use-format · yarn dlx @aedis/cli@0.1.0 add use-format · bunx @aedis/cli@0.1.0 add use-formatProps
| Prop | Type | Default | Description |
|---|---|---|---|
| date(value, options?) | string | — | Intl.DateTimeFormat; default { dateStyle: "medium" }. |
| dateTime(value) | string | — | Medium date and short time. |
| number(value, options?) | string | — | Intl.NumberFormat. |
| currency(value, code) | string | — | ISO 4217 code, e.g. BRL or USD. |
| relative(value, now?) | string | — | "2 minutes ago", "yesterday", "in 3 days". |
Security
- No dependency: uses the Intl APIs of the runtime.
- Pass the time zone in options when the server and the viewer differ.