Skip to content

Commit

Permalink
docs: update wording
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Nov 12, 2024
1 parent 3ee442e commit 8dbd470
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![npm version][npm-version-src]][npm-version-href]
[![bundle][bundle-src]][bundle-href]

Universal lazy loading library leveraging native browser APIs. It's intended to be used with the `loading="lazy"` attribute alongside (blurry) placeholder images and with a [BlurHash](https://unlazy.byjohann.dev/placeholders/blurhash) or [ThumbHash](https://unlazy.byjohann.dev/placeholders/thumbhash) string.
Universal lazy loading library leveraging native browser APIs. It is intended to be used with the `loading="lazy"` attribute alongside (blurry) placeholder images and with a [BlurHash](https://unlazy.byjohann.dev/placeholders/blurhash) or [ThumbHash](https://unlazy.byjohann.dev/placeholders/thumbhash) string.

## Features

Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/build-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default defineConfig({

unlazy ships with the [BlurHash](/placeholders/blurhash) and [ThumbHash](/placeholders/thumbhash) decoding algorithms to decode the hash values into images.

In case your project doesn't use these placeholders, you can disable the hash decoding algorithms to reduce the bundle size. Use the following build flags to tree-shake the hash decoding algorithms:
In case your project does not use these placeholders, you can disable the hash decoding algorithms to reduce the bundle size. Use the following build flags to tree-shake the hash decoding algorithms:

- `__UNLAZY_HASH_DECODING__`: This flag is set to `true` by default.

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# What Is unlazy?

unlazy is a universal lazy loading library leveraging native browser APIs. It's intended to be used with inlined (blurry) placeholder images or a placeholder image representation like a [BlurHash](/placeholders/blurhash) or [ThumbHash](/placeholders/thumbhash) alongside the native `loading="lazy"` attribute.
unlazy is a universal lazy loading library leveraging native browser APIs. It is intended to be used with inlined (blurry) placeholder images or a placeholder image representation like a [BlurHash](/placeholders/blurhash) or [ThumbHash](/placeholders/thumbhash) alongside the native `loading="lazy"` attribute.

Images are initially rendered with blurry placeholders, giving the user an impression of the page layout and content. As the images enter the viewport, they are replaced with the full-quality versions, providing a smoother experience. This approach prioritizes the initial rendering of the page and improves the perceived performance for users, especially when the connection is slow or unstable.

Expand Down
4 changes: 2 additions & 2 deletions docs/guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ For more use cases, head over to the [Usage](/guide/usage) guide.

## Without a Build Step

unlazy can be used without a build step. Useful for prototyping or when you don't want to add a build step to your project. Simply load it from a CDN:
unlazy can be used without a build step. Useful for prototyping or when you do not want to add a build step to your project. Simply load it from a CDN:

- Global build: <CdnLink name="unlazy.iife.js" />
- Exposes `UnLazy` global property, supports auto initializing
Expand Down Expand Up @@ -64,7 +64,7 @@ The short CDN URLs are meant for prototyping. For production usage, use a fully

### Manual Initialization

If you don't want the auto-initialize, remove the `init` attribute and move the scripts to end of the `<body>` tag:
If you do not want the auto-initialize the library, remove the `init` attribute and move the scripts to end of the `<body>` tag:

```html
<script src="https://unpkg.com/unlazy"></script>
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,5 @@ loadImage(coolImage)
```

::: tip
Keep in mind that manually loading images might negatively affect the perceived performance, as it will force the full-quality image to load immediately, even if it's not visible on the viewport.
Keep in mind that manually loading images might negatively affect the perceived performance, as it will force the full-quality image to load immediately, even if it is not visible on the viewport.
:::
2 changes: 1 addition & 1 deletion docs/integrations/nuxt.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ The `UnLazyImage` component accepts the following props:
| `placeholderSize` | Number | The size of the longer edge (width or height) of the BlurHash image to be decoded, depending on the aspect ratio. This option only applies when the `blurhash` prop is used. |
| `placeholderRatio` | Number | Aspect ratio (width / height) of the decoded BlurHash image. Only applies to SSR-decoded placeholder images from a BlurHash string. |
| `lazyLoad` | Boolean | A flag to indicate whether the image should be lazy-loaded (default) or deferred until this prop is set to `true`. Note: Placeholder images from hashes will still be decoded. |
| `preload` | Boolean | A flag to indicate whether the image should be preloaded, even if it's not in the viewport yet. |
| `preload` | Boolean | A flag to indicate whether the image should be preloaded, even if it is not in the viewport yet. |
| `ssr` | Boolean | Whether the ThumbHash or BlurHash should be decoded on the server. Overrides the global module configuration if set. |

### Emitted Events
Expand Down
2 changes: 1 addition & 1 deletion docs/integrations/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The `UnLazyImage` component accepts the following props:
| `thumbhash` | String | A ThumbHash string representing the blurry placeholder image. |
| `placeholderSrc` | String | Optional image source URL for a custom placeholder image. Will be ignored if a BlurHash or ThumbHash is provided. |
| `placeholderSize` | Number | The size of the longer edge (width or height) of the BlurHash image to be decoded, depending on the aspect ratio. This option only applies when the `blurhash` prop is used. |
| `preload` | Boolean | A flag to indicate whether the image should be preloaded, even if it's not in the viewport yet. |
| `preload` | Boolean | A flag to indicate whether the image should be preloaded, even if it is not in the viewport yet. |

### Emitted Events

Expand Down
2 changes: 1 addition & 1 deletion docs/placeholders/thumbhash.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

unlazy supports client-side and server-side (SSR) decoding of [ThumbHash](https://github.com/evanw/thumbhash) strings. This allows you to use ThumbHash placeholders for images that are not yet loaded.

A ThumbHash is a very compact representation of a placeholder for an image. It's similar to [BlurHash](https://blurha.sh) but with the following advantages:
A ThumbHash is a very compact representation of a placeholder for an image. It is similar to [BlurHash](https://blurha.sh) but with the following advantages:

- Encodes more detail in the same space
- Also encodes the aspect ratio
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt/src/runtime/components/UnLazyImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const props = withDefaults(
*/
lazyLoad?: boolean
/**
* A flag to indicate whether the image should be preloaded, even if it's not in the viewport yet.
* A flag to indicate whether the image should be preloaded, even if it is not in the viewport yet.
* @default false
*/
preload?: boolean
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/components/UnLazyImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const props = defineProps<{
/** The size of the longer edge (width or height) of the BlurHash image to be decoded, depending on the aspect ratio. This option only applies when the `blurhash` prop is used. */
placeholderSize?: number
/**
* A flag to indicate whether the image should be preloaded, even if it's not in the viewport yet.
* A flag to indicate whether the image should be preloaded, even if it is not in the viewport yet.
* @default false
*/
preload?: boolean
Expand Down

0 comments on commit 8dbd470

Please sign in to comment.