Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add stacked-avatar component with tooltip #525

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Raju-kadel-27
Copy link
Contributor

@Raju-kadel-27 Raju-kadel-27 commented Sep 27, 2024

This might be useful while rendering multiple recipients with avatars in react-table for investor updates or maybe displaying recipients during e-signing process.

Example usage :

import { AvatarStack } from "@/components/ui/avatar-stack";

const MyComponent = () => {
 const avatars = [
  {
    name: "John Doe",
    image: "https://avatars.githubusercontent.com/u/54895192?v=4",
  },
  {
    name: "Jane Smith",
    image: "https://avatars.githubusercontent.com/u/54895192?v=4",
  },
  {
    name: "Alice Johnson",
    image: "https://avatars.githubusercontent.com/u/54895192?v=4",
  },
  {
    name: "Den Brown",
    image: "https://avatars.githubusercontent.com/u/54895192?v=4",
  },
  {
    name: "Jharna Brown",
    image: "https://avatars.githubusercontent.com/u/54895192?v=4",
  },
  {
    name: "Robin Brown",
    image: "https://avatars.githubusercontent.com/u/54895192?v=4",
  },
  {
    name: "Aakash Brown",
    image: "https://avatars.githubusercontent.com/u/54895192?v=4",
  },
  {
    name: "Bibek Brown",
    image: "https://avatars.githubusercontent.com/u/54895192?v=4",
  },
];

  return (
    <div>
      <h2>Avatar Stack Example</h2>
      <AvatarStack 
        avatars={avatars} 
        maxAvatarsAmount={3} 
        orientation="horizontal" 
        spacing="md" 
      />
    </div>
  );
};

export default MyComponent;

Screenshot from 2024-09-28 12-35-00

Copy link

github-actions bot commented Sep 27, 2024

Thank you for following the naming conventions for pull request titles! 🙏

@Raju-kadel-27 Raju-kadel-27 marked this pull request as draft September 27, 2024 15:53
@Raju-kadel-27 Raju-kadel-27 marked this pull request as ready for review September 28, 2024 07:01
@Raju-kadel-27 Raju-kadel-27 changed the title feat: add stacked-avatar component feat: add stacked-avatar component with tooltip Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant