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

<script>
import { Avatar } from '@svar-ui/svelte-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" }
];
</script>

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

Related article: Limiting visible avatars