A shadcn-style locale provider utility built with Ark UI primitives.

Localeen-US
Formatted dateApr 16, 2026
Formatted size1.28 MB
Formatted time5:35 PM
Contains "ca"Yes
Sortedapple, cairo, zebra

Installation

npx shadcn@latest add @ark-cn/locale

Usage

import { LocaleProvider, useLocaleContext } from "@/components/ui/locale"

Examples

Default

Localeen-US
Formatted dateApr 16, 2026
Formatted size1.28 MB
Formatted time5:35 PM
Contains "ca"Yes
Sortedapple, cairo, zebra

API reference

This utility mirrors Ark UI's locale provider and locale hooks. Use it together with explicit dir="ltr" or dir="rtl" containers when you need layout direction as well as locale-aware formatting.

See the ARK UI documentation for the full API.