Avatar Upload

React profile photo uploader with an avatar preview and an Upload button that opens a hidden image file input. Shows initials until a picture is chosen.

src/registry/ui/avatar-upload.tsx/r/avatar-upload.json

Installation#

bash
npx shadcn@latest add @minidev/avatar-upload

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/avatar-upload.json

Usage#

tsx
import { AvatarUpload } from "@/components/ui/avatar-upload"

export function Example() {
  return <AvatarUpload />
}

API reference#

AvatarUpload props
PropTypeDefault
namestring"User"
classNamestring-

Dependencies#

npm

React only

Built from

All settings page components

Learn more