Join our Discord Community
Account

👋 This is a community-driven shadcn/ui resource. For the official documentation, visit ui.shadcn.com

Account Avatar Upload

Profile avatar upload with image preview, drag-and-drop support, file validation, crop functionality, and remove/replace options

Looking to implement shadcn/ui blocks?

Join our Discord community for help from other developers.


Managing profile pictures shouldn't be complicated. This React avatar upload component handles drag-and-drop files, shows live previews, validates image types and sizes, and lets users crop before saving. Built with shadcn/ui Card, Avatar, Button, Alert, and Input components with Lucide React icons, users can upload via click or drag, see immediate previews, and remove unwanted images. File size warnings, format validation, and fallback initials—perfect for user profiles, account settings, or any app where profile customization improves engagement and personalization.

Loading preview...

Installation

npx shadcn@latest add https://www.shadcn.io/registry/account-avatar-upload-01.json
npx shadcn@latest add https://www.shadcn.io/registry/account-avatar-upload-01.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/account-avatar-upload-01.json
bunx shadcn@latest add https://www.shadcn.io/registry/account-avatar-upload-01.json

Questions you might have