1.1.2 • Published 1 year ago

lazy-svelte-image v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

lazy-image-loader

A custom Image component/tag like component with customizations, loader ...

Installing the Package

If you're seeing this, you've probably already done this step. Congrats!

npm i lazy-svelte-image

Usage

Once you've installed you can import the package and use just like <img> . an exaple is given below

import { Image } from 'lazy-svelte-image'


<Image src="" alt="" />

# or

<Image> <!-- slot--> </Image>

Customization

Currenlty you can provide custom loader and broken image icon as slot. use slot like how you use it in svelte.

Props

  • disableLoader - disable all loaders
  • disableBroken - disable all broken view
  • backgroundColor - set custom background color for default broken/loader

    Slots

    For custom broken Images/Icons

    <span slot="boken">
      <!-- provide code here -->
    </span>

    For custom Loaders

    <span slot="loader">
      <!-- provide loader code here  -->
    </span>
Looking forward for feature requests and usages 😃..
1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago