Draggable Avatar

It displays a circular, draggable avatar with customizable size and style.

Knowledge at
Your Fingertip

Avatar

Installation

npx shadcn@latest add https://scrollxui.dev/registry/draggable-avatar.json 

Usage

import DraggableAvatar from "@/components/ui/draggable-avatar";
<DraggableAvatar
  image="/image.jpg"
  borderColor="#60A5FA"
  range={200}
  size={90}
/>

API Reference

Draggable Avatar

It displays a circular, draggable avatar with customizable size and style.

Props

PropertyTypeDefaultDescription
imagestring-
URL of the avatar image displayed inside the draggable circle.
borderColorstring"#60A5FA"
Color of the avatar’s circular border and the bottom marker line.
rangenumber300
Maximum drag distance (in pixels) allowed from the initial position.
sizenumber100
Diameter of the circular avatar in pixels.

Built withby Ahdeetai.