@akhatmirzo/ui

Profile settings

Avatar upload, name, email, phone and region — validated with @akhatmirzo/ui/form and zUz schemas.

Add with the CLI: npx @akhatmirzo/cli add settings-profile

Profil

Bu ma'lumotlar mijozlar va jamoa a'zolariga ko'rinadi.

Shaxsiy ma'lumotlar

Rasm, ism va aloqa ma'lumotlari. Telefon raqami SMS orqali tasdiqlanadi.

PNG yoki JPG, 2 MB gacha

SMS kod yuboriladi

+998

Buyurtmalar shu hududdan yetkaziladi

160 belgigacha

88 / 160

What's inside

  • Form + FormField on react-hook-form with zodResolver; messages are in Uzbek (zUz).
  • The avatar uses the FormField render escape hatch for a custom control (pick, preview, remove).
  • zUz.phone() normalizes the value to 998901234567, zUz.region() returns a region id.
  • Server errors go to FormRootError (try the email band@misol.uz).

Components used

Installation

The CLI copies the block file into your project (components/blocks/settings-profile.tsx) and offers to install the packages it needs:

npx @akhatmirzo/cli add settings-profile

Manually: install the packages and copy the file from the "Code" tab into your project.

pnpm add @akhatmirzo/ui @akhatmirzo/tokens @akhatmirzo/core @hookform/resolvers lucide-react react-hook-form zod