Components
Loading preview...
A flexible, animated spring component that attaches a draggable element (avatar, text, icon, or any React node) to its origin with a spring line.
@arhamkhnz
npx shadcn@latest add https://21st.dev/r/arhamkhnz/spring-elementimport { SpringElement } from "@/components/ui/spring-element";
import {
Avatar,
AvatarFallback,
AvatarImage,
} from '@/components/ui/avatar';
const DemoOne = () => {
return <SpringElement>
<Avatar className="size-20" >
<AvatarImage
draggable={ false }
src = "https://pbs.twimg.com/profile_images/1897311929028255744/otxpL-ke_400x400.jpg"
/>
<AvatarFallback>AK < /AvatarFallback>
</Avatar>
</SpringElement>
};
export { DemoOne };