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

3.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 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 lang="ts">
  import Avatar from '@svelte-put/avatar/Avatar.svelte';

  export let id: string;
  export let email = '';
  export let firstName = '';
  export let lastName = '';
</script>

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

Changelog

/@svelte-put/avatar/

    Package Sidebar

    Install

    npm i @svelte-put/avatar

    Weekly Downloads

    61

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    24.3 kB

    Total Files

    11

    Last publish

    Collaborators

    • vnphanquang