amankaushik481

Avatar Upload

Component

About

A profile photo picker that shows the current avatar with an Upload button opening a hidden file input and previewing the picked image locally.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Avatar Upload to your project and fits it to your theme.

Code

How Avatar Upload is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

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

export default function AvatarUploadDemo() {
  return (
    <div className="flex items-center justify-center p-8">
      <AvatarUpload
        name="Maya Chen"
        onChange={(file) => {
          console.log("picked file:", file);
        }}
      />
    </div>
  );
}

More by amankaushik481

View all
  • Icon Button

    Icon Button

    14
  • Background Boxes

    Background Boxes

    12
  • Chip Filter

    Chip Filter

    8
  • Typing Text

    Typing Text

    7
  • Treemap Chart

    Treemap Chart

    6
  • File Dropzone

    File Dropzone

    5
  • Emoji Picker

    Emoji Picker

    4
  • Morphing Text

    Morphing Text

    2