Ruixen Pro is now live.50+ premium components, templates, blocks, and lifetime updates.

Command Palette

Search for a command to run...

Docs
Avatar Quick Actions

Avatar Quick Actions

An orbital action ring that blooms outward from the avatar with staggered spring emergence — hover any action and the rest dim, drawing the eye to the focused one.

Installation

Usage

import AvatarQuickActions from "@/components/ruixen/avatar-quick-actions";
import { MessageCircle, Phone, UserPlus } from "lucide-react";
 
export default function App() {
  return (
    <AvatarQuickActions
      avatarSrc="/avatar.jpg"
      avatarFallback="JD"
      items={[
        { icon: <MessageCircle className="size-3.5" />, label: "Message" },
        { icon: <Phone className="size-3.5" />, label: "Call" },
        { icon: <UserPlus className="size-3.5" />, label: "Follow" },
      ]}
    />
  );
}

Props

PropTypeDefaultDescription
itemsAvatarQuickActionsItem[]-Array of action items (required)
avatarSrcstring-Avatar image URL
avatarFallbackstring-Fallback text when image fails
sizenumber44Avatar diameter in pixels
classNamestring-Additional CSS classes

Item Structure

interface AvatarQuickActionsItem {
  icon: ReactNode; // Icon element to display
  label: string; // Name shown below action on hover
  onClick?: () => void; // Click handler
}

Features

  • Orbital Bloom: Actions spring outward from the avatar center with staggered timing (40ms per action)
  • Focus Dim: Non-active actions fade to 50% opacity, drawing the eye to the focused action
  • Avatar Contraction: Avatar breathes down to 0.92x when releasing actions, signaling state change
  • Orbit Ring: Subtle circular guide springs in to connect the action positions
  • Label Reveal: Hovering an individual action springs its label into view below
  • Proportional Scaling: Orbit radius, action size, container — all derived from size
  • Zero Portals: No tooltip, no popover — actions exist in the same spatial plane as the avatar
  • Fallback Initials: Shows first letter of fallback text when image fails to load