@svelte-put/avatar
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

@svelte-put/avatar

npm.badge bundlephobia.badge docs.badge repl.badge

Svelte Avatar component and utilities for building avatars with builtin supports for Gravatar and UI Avatar.

svelte-put

This package is part of the @svelte-put family. For contributing guideline and more, refer to its readme.

Usage & Documentation

See the dedicated documentation page here.

Quick Start

<script>
  import Avatar from '@svelte-put/avatar/Avatar.svelte';

  let { id, email, firstName, lastName } = $props();
</script>

<Avatar
  src="https://your.api/avatar/{id}"
  gravatar="{email}"
  uiAvatar="{firstName}+{lastName}"
  fallback="https://your.api/avatar/default"
/>

Package Sidebar

Install

npm i @svelte-put/avatar

Weekly Downloads

51

Version

4.0.0

License

MIT

Unpacked Size

19.9 kB

Total Files

12

Last publish

Collaborators

  • vnphanquang