Skip to main content

limit

Description​

Optional. Sets the max number of visible avatar badges

When displaying multiple users, it limits the number of visible avatar badges. Default is undefined.

Usage​

limit?: number;

Example​

import { Avatar } from '@svar-ui/react-core';

const users = [
{ id: 1, name: "John Doe" },
{ id: 2, name: "Anna Smith" },
{ id: 3, name: "Bob Johnson" },
{ id: 4, name: "Mary White" },
{ id: 5, name: "Tom Brown" }
];

<Avatar value={users} limit={4} />

Related article: Limiting visible avatars