Socket
Socket
Sign inDemoInstall

svelte-lazy

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-lazy - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

2

package.json

@@ -6,3 +6,3 @@ {

"main": "index.js",
"version": "1.0.10",
"version": "1.0.11",
"types": "index.d.ts",

@@ -9,0 +9,0 @@ "repository": "leafOfTree/svelte-lazy",

@@ -0,1 +1,3 @@

<img src="https://raw.githubusercontent.com/leafOfTree/leafOfTree.github.io/master/svelte-lazy.svg" width="60" height="60" alt="icon" align="left"/>
# svelte-lazy [![Build Status][1]][2] [![npm version][3]][4]

@@ -31,22 +33,27 @@

- `height: Number|String` Default: `0`. Height of the component before load.
- **height**: *Number|String*. Default: `0` (px for Number).
- Height of the component before load.
- **Set a proper value** to avoid scroll bounce. One way is to use the content height which can be measured by the inspector in the devTool after load.
**Set a proper value** to avoid scroll bounce. One way is to use the content height which can be mensured by the inspector in the devTool after load.
- **offset**: *Number*. Default: `150` (px).
- Offset from the top of the component to the bottom of the viewport that triggers loading when in it.
- `offset: Number` Default: `150`. Offset from the top of the component to the bottom of the viewport that triggers loading when in it.
- **placeholder**: *String|Component*. Default: `null`.
- Placeholder before load.
> Number values use `px` as unit.
- **placeholderProps**: *Object*. Default `null`.
- Props for when using a component as a placeholder.
- `placeholder: String|Component` Default: `null`. Placeholder before load.
- **class**: *String*. Default: `''`.
- Additional class for the container div. It will be `svelte-lazy ${class}`.
- `placeholderProps: Object` Default `null`. When using a component as a placeholder, the props will be passed to it.
- **fadeOption**: *Object*. Default: `{ delay: 0, duration: 400 }`.
- Option for the fade in transition. Set `null` to disable it.
- `class: String` Default: `''`. Additional class for the container div. It will be `svelte-lazy ${class}`.
- **onload**: *Function (node) => {}*. Default: `null`.
- Fucntion that is called when loaded.
- `fadeOption: Object` Default: `{ delay: 0, duration: 400 }`. Option for the fade in transition. Set `null` to disable it.
- **resetHeightDelay**: *Number*. Default: `0` (milliseconds).
- Delay to reset the component height to `auto` after loaded. Might be useful to wait for remote resources like images.
- `onload: Function (node) => {}` Default: `null`. Fucntion that is called when loaded.
- `resetHeightDelay: Number` Default: `0` (milliseconds). Delay to reset the component height to `auto` after loaded. Might be useful to wait for remote resources like images.
## Changelog

@@ -53,0 +60,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc